X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/846b7de4a868bf8dc1270f76a01c33738576694d..0a03cd809dd45e3645a54feffe364d8f2b33d71e:/src/cxx/Msg.hpp diff --git a/src/cxx/Msg.hpp b/src/cxx/Msg.hpp index 2ed2f96e29..95095fb162 100644 --- a/src/cxx/Msg.hpp +++ b/src/cxx/Msg.hpp @@ -1,71 +1,80 @@ -/* - * Msg.hpp - * - * This file contains the declaration of the wrapper class of the native MSG task type. - * - * Copyright 2006,2007 Martin Quinson, Malek Cherier - * All right reserved. - * - * This program is free software; you can redistribute - * it and/or modify it under the terms of the license - *(GNU LGPL) which comes with this package. - * - */ - -#ifndef MSG_HPP -#define MSG_HPP - -// Compilation C++ recquise -#ifndef __cplusplus - #error Msg.hpp requires C++ compilation (use a .cxx suffix) -#endif - -#include -#include -#include - - -namespace SimGrid -{ - namespace Msg - { - class MsgException; - class InvalidArgumentException; - class LogicException; - - /*! \brief init() - Initialize MSG (This function must be called at the begining of each simulation). - * - * \param argv A list of arguments. - * \param argc The number of arguments of the list. - */ - SIMGRIDX_EXPORT void init(int argc, char** argv); - - /*! \brief finalize() - Finalize MSG (This function must be called at the end of each simulation). - * - * \exception If this function fails, it throws a exception describing the cause of the failure. - */ - SIMGRIDX_EXPORT void finalize(void) - throw (MsgException); - - /*! \brief info() - Display information (using xbt log format). - * - * \param s The information to display. - */ - SIMGRIDX_EXPORT void info(const char* s); - - /*! \brief getClock() - Retrieve the simulation time - * - * \return The current simulation time. - */ - SIMGRIDX_EXPORT double getClock(void); - - - SIMGRIDX_EXPORT void setMaxChannelNumber(int number) - throw(InvalidArgumentException, LogicException); - - SIMGRIDX_EXPORT int getMaxChannelNumber(void); - - } // namespace Msg -} // namespace SimGrid - -#endif // !MSG_HPP +/* + * Msg.hpp + * + * This file contains the declaration of the wrapper class of the native MSG task type. + * + * Copyright 2006,2007 Martin Quinson, Malek Cherier + * All right reserved. + * + * This program is free software; you can redistribute + * it and/or modify it under the terms of the license + *(GNU LGPL) which comes with this package. + * + */ + +#ifndef MSG_HPP +#define MSG_HPP + +// Compilation C++ recquise +#ifndef __cplusplus + #error Msg.hpp requires C++ compilation (use a .cxx suffix) +#endif + +#include +#include +#include + +#include + + +namespace SimGrid +{ + namespace Msg + { + class MsgException; + class InvalidArgumentException; + class LogicException; + + /*! \brief init() - Initialize MSG (This function must be called at the begining of each simulation). + * + * \param argv A list of arguments. + * \param argc The number of arguments of the list. + */ + SIMGRIDX_EXPORT void init(int argc, char** argv); + + /*! \brief finalize() - Finalize MSG (This function must be called at the end of each simulation). + * + * \exception If this function fails, it throws a exception describing the cause of the failure. + */ + SIMGRIDX_EXPORT void finalize(void) + throw (MsgException); + + /*! \brief info() - Display information (using xbt log format). + * + * \param s The information to display. + */ + SIMGRIDX_EXPORT void info(const StringHelper& s); + + SIMGRIDX_EXPORT void info(const char* s); + + SIMGRIDX_EXPORT void error(const StringHelper& s); + + SIMGRIDX_EXPORT void error(const char* s); + + + /*! \brief getClock() - Retrieve the simulation time + * + * \return The current simulation time. + */ + SIMGRIDX_EXPORT double getClock(void); + + + SIMGRIDX_EXPORT void setMaxChannelNumber(int number) + throw(InvalidArgumentException, LogicException); + + SIMGRIDX_EXPORT int getMaxChannelNumber(void); + + } // namespace Msg +} // namespace SimGrid + +#endif // !MSG_HPP