Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
last change of cpp wrappers for msg
[simgrid.git] / src / cxx / Environment.hpp
index 89f6e48..8f8e0a0 100644 (file)
-/*\r
- * Environment.hpp\r
- *\r
- * This file contains the declaration of the wrapper class of the native MSG task type.\r
- *\r
- * Copyright 2006,2007 Martin Quinson, Malek Cherier           \r
- * All right reserved. \r
- *\r
- * This program is free software; you can redistribute \r
- * it and/or modify it under the terms of the license \r
- *(GNU LGPL) which comes with this package. \r
- *\r
- */  \r
\r
-#ifndef MSG_ENVIRONMENT_HPP\r
-#define MSG_ENVIRONMENT_HPP\r
-\r
-#ifndef __cplusplus\r
-       #error Environment.hpp requires C++ compilation (use a .cxx suffix)\r
-#endif\r
-\r
-#include <NullPointerException.hpp>\r
-#include <FileNotFoundException.hpp>\r
-#include <InvalidArgumentException.hpp>\r
-#include <LogicException.hpp>\r
-#include <MsgException.hpp>\r
-\r
-namespace SimGrid\r
-{\r
-       namespace Msg\r
-       {\r
-               class NullPointerException;\r
-               class FileNotFoundException;\r
-               class InvalidArgumentException;\r
-               class LogicException;\r
-               class MsgException;\r
-\r
-               // Environment class wrapper declaration\r
-               class SIMGRIDX_EXPORT Environment\r
-               {\r
-                       public:\r
-                               \r
-                               /*! \brief Default constructor.\r
-                                */\r
-                               Environment();\r
-                               \r
-                               /*! \brief Copy constructor.\r
-                                */\r
-                               Environment(const Environment& rEnvironment);\r
-                               \r
-                               /*! \brief Constructor.\r
-                                *\r
-                                * \param file                  The xml file describing the environment of the simulation.\r
-                                *\r
-                                * \exception                   If this constructor fails, it throws one of the exception\r
-                                *                                              described below:\r
-                                *\r
-                                *                                              [NullPointerException]          if the parameter file is NULL.\r
-                                *\r
-                                *                                              [FileNotFoundException]         if the file is not found.\r
-                                */\r
-                               Environment(const char* file)\r
-                               throw(NullPointerException, FileNotFoundException);\r
-                               \r
-                               /*! \brief Destructor.\r
-                                */\r
-                               virtual ~Environment();\r
-                               \r
-                       // Operations.\r
-                               \r
-                               /*! brief Environment::load() - Load the environment of a simulation.\r
-                                *\r
-                                * \exception                   If this method fails, it throws the exception described below:\r
-                                *\r
-                                *                                              [LogicException]                        if the file of the environment is not yet specified or\r
-                                *                                                                                                      if the environment is already loaded.\r
-                                */\r
-                               void load(void)\r
-                               throw(LogicException);\r
-                               \r
-                               /*! \brief Environment::load() - Load the environment of a simulation.\r
-                                *\r
-                                * \param file                  The xml file describing the environment of the simulation.\r
-                                *\r
-                                * \exception                   If this method fails, it throws one of the exceptions described below.\r
-                                *\r
-                                *                                              [NullPointerException]          if the parameter file is NULL.\r
-                                *\r
-                                *                                              [FileNotFoundException]         if the specified file is not found.\r
-                                *\r
-                                *                                              [LogicException]                        if the environment is already loaded.\r
-                                */\r
-                               void load(const char* file)\r
-                               throw(NullPointerException, FileNotFoundException, LogicException);\r
-                               \r
-                               /*! \brief Environment::isLoaded() - Tests if an environment is loaded.\r
-                                *\r
-                                * \return                              If the environment is loaded, the method returns true. Otherwise the method\r
-                                *                                              returns false.\r
-                                */\r
-                               bool isLoaded(void) const;\r
-                               \r
-                       // Getters/setters\r
-                               /*! \brief Environment::setFile() - Sets the xml file of the environment.\r
-                                *\r
-                                * \param file                  The file describing the environment.\r
-                                *\r
-                                * \exception                   If the method fails, it throws one of the exceptions described below:\r
-                                *\r
-                                *                                              [NullPointerException]          if the parameter file is NULL.\r
-                                *                              \r
-                                *                                              [FileNotFoundException]         if the file is not found.\r
-                                *\r
-                                *                                              [LogicException]                        if the environment is already loaded.\r
-                                */\r
-                               void setFile(const char* file)\r
-                               throw(NullPointerException, FileNotFoundException, LogicException);\r
-                               \r
-                               /*! \brief Environment::getFile() - Gets the xml file environment description.\r
-                                *\r
-                                * \return                              The xml file describing the environment.                                \r
-                                *\r
-                                */\r
-                               const char* getFile(void) const;\r
-                               \r
-                       // Operators.\r
-                               \r
-                               /*! \brief Assignment operator.\r
-                                *\r
-                                * \exception                   If this operator fails, it throws the exception described below:\r
-                                *\r
-                                *                                              [LogicException]                        if you try to assign a loaded environment.\r
-                                */\r
-                               const Environment& operator = (const Environment& rEnvironment)\r
-                               throw(LogicException);\r
-                               \r
-                       private:\r
-                               \r
-                               // Attributes.\r
-                               \r
-                               // the xml file which describe the environment of the simulation.\r
-                               const char* file;\r
-                               \r
-                               // flag : is true the environment of the simulation is loaded.\r
-                               bool loaded;\r
-               };\r
-               \r
-       } // namespace Msg\r
-} // namespace SimGrid\r
-\r
-\r
-#endif // !MSG_ENVIRONMENT_HPP\r
-\r
+/*
+ * Environment.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_ENVIRONMENT_HPP
+#define MSG_ENVIRONMENT_HPP
+
+#ifndef __cplusplus
+       #error Environment.hpp requires C++ compilation (use a .cxx suffix)
+#endif
+
+#include <NullPointerException.hpp>
+#include <FileNotFoundException.hpp>
+#include <InvalidArgumentException.hpp>
+#include <LogicException.hpp>
+#include <MsgException.hpp>
+
+namespace SimGrid
+{
+       namespace Msg
+       {
+               class NullPointerException;
+               class FileNotFoundException;
+               class InvalidArgumentException;
+               class LogicException;
+               class MsgException;
+
+               // Environment class wrapper declaration
+               class SIMGRIDX_EXPORT Environment
+               {
+                       public:
+                               
+                               /*! \brief Default constructor.
+                                */
+                               Environment();
+                               
+                               /*! \brief Copy constructor.
+                                */
+                               Environment(const Environment& rEnvironment);
+                               
+                               /*! \brief Constructor.
+                                *
+                                * \param file                  The xml file describing the environment of the simulation.
+                                *
+                                * \exception                   If this constructor fails, it throws one of the exception
+                                *                                              described below:
+                                *
+                                *                                              [NullPointerException]          if the parameter file is NULL.
+                                *
+                                *                                              [FileNotFoundException]         if the file is not found.
+                                */
+                               Environment(const char* file)
+                               throw(NullPointerException, FileNotFoundException);
+                               
+                               /*! \brief Destructor.
+                                */
+                               virtual ~Environment();
+                               
+                       // Operations.
+                               
+                               /*! brief Environment::load() - Load the environment of a simulation.
+                                *
+                                * \exception                   If this method fails, it throws the exception described below:
+                                *
+                                *                                              [LogicException]                        if the file of the environment is not yet specified or
+                                *                                                                                                      if the environment is already loaded.
+                                */
+                               void load(void)
+                               throw(LogicException);
+                               
+                               /*! \brief Environment::load() - Load the environment of a simulation.
+                                *
+                                * \param file                  The xml file describing the environment of the simulation.
+                                *
+                                * \exception                   If this method fails, it throws one of the exceptions described below.
+                                *
+                                *                                              [NullPointerException]          if the parameter file is NULL.
+                                *
+                                *                                              [FileNotFoundException]         if the specified file is not found.
+                                *
+                                *                                              [LogicException]                        if the environment is already loaded.
+                                */
+                               void load(const char* file)
+                               throw(NullPointerException, FileNotFoundException, LogicException);
+                               
+                               /*! \brief Environment::isLoaded() - Tests if an environment is loaded.
+                                *
+                                * \return                              If the environment is loaded, the method returns true. Otherwise the method
+                                *                                              returns false.
+                                */
+                               bool isLoaded(void) const;
+                               
+                       // Getters/setters
+                               /*! \brief Environment::setFile() - Sets the xml file of the environment.
+                                *
+                                * \param file                  The file describing the environment.
+                                *
+                                * \exception                   If the method fails, it throws one of the exceptions described below:
+                                *
+                                *                                              [NullPointerException]          if the parameter file is NULL.
+                                *                              
+                                *                                              [FileNotFoundException]         if the file is not found.
+                                *
+                                *                                              [LogicException]                        if the environment is already loaded.
+                                */
+                               void setFile(const char* file)
+                               throw(NullPointerException, FileNotFoundException, LogicException);
+                               
+                               /*! \brief Environment::getFile() - Gets the xml file environment description.
+                                *
+                                * \return                              The xml file describing the environment.                                
+                                *
+                                */
+                               const char* getFile(void) const;
+                               
+                       // Operators.
+                               
+                               /*! \brief Assignment operator.
+                                *
+                                * \exception                   If this operator fails, it throws the exception described below:
+                                *
+                                *                                              [LogicException]                        if you try to assign a loaded environment.
+                                */
+                               const Environment& operator = (const Environment& rEnvironment)
+                               throw(LogicException);
+                               
+                       private:
+                               
+                               // Attributes.
+                               
+                               // the xml file which describe the environment of the simulation.
+                               const char* file;
+                               
+                               // flag : is true the environment of the simulation is loaded.
+                               bool loaded;
+               };
+               
+       } // namespace Msg
+} // namespace SimGrid
+
+
+#endif // !MSG_ENVIRONMENT_HPP
+