Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A string utility class and a new Exception (used to throw out of band exception)
[simgrid.git] / src / cxx / Msg.hpp
index 6125156..048e38c 100644 (file)
 #endif\r
 \r
 #include <MsgException.hpp>\r
+#include <InvalidArgumentException.hpp>\r
+#include <LogicException.hpp>\r
+\r
+#include <StringHelper.hpp>\r
+\r
 \r
 namespace SimGrid\r
 {\r
        namespace Msg\r
        {\r
+               class MsgException;\r
+               class InvalidArgumentException;\r
+               class LogicException;\r
                \r
                /*! \brief init() - Initialize MSG (This function must be called at the begining of each simulation).\r
                 *\r
                 * \param argv                  A list of arguments.\r
                 * \param argc                  The number of arguments of the list.\r
                 */\r
-               static void init(int argc, char** argv);\r
+               SIMGRIDX_EXPORT void init(int argc, char** argv);\r
                \r
-               /* \brief finalize() - Finalize MSG (This function must be called at the end of each simulation).\r
+               /*! \brief finalize() - Finalize MSG (This function must be called at the end of each simulation).\r
                 *\r
                 * \exception                   If this function fails, it throws a exception describing the cause of the failure.\r
                 */\r
-               static void finalize(void)\r
+               SIMGRIDX_EXPORT void finalize(void)\r
                throw (MsgException);\r
                \r
                /*! \brief info() - Display information (using xbt log format).\r
                 *\r
                 * \param s                             The information to display.\r
                 */\r
-               static void info(const char* s);\r
-               \r
-               \r
-               \r
+               SIMGRIDX_EXPORT void info(const StringHelper& s);\r
+\r
+               SIMGRIDX_EXPORT void info(const char* s);\r
+\r
+               SIMGRIDX_EXPORT void error(const StringHelper& s);\r
+\r
+               SIMGRIDX_EXPORT void error(const char* s);\r
+\r
+\r
+               /*! \brief getClock() -  Retrieve the simulation time\r
+                *\r
+                * \return                              The current simulation time.\r
+                */\r
+               SIMGRIDX_EXPORT double getClock(void);\r
+\r
+\r
+               SIMGRIDX_EXPORT void setMaxChannelNumber(int number)\r
+               throw(InvalidArgumentException, LogicException);\r
+\r
+               SIMGRIDX_EXPORT int getMaxChannelNumber(void);\r
                \r
        } // namespace Msg\r
 } // namespace SimGrid\r
 \r
-#endif // !MSG_HPP
\ No newline at end of file
+#endif // !MSG_HPP\r