Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
9eae1e37325eeca506cc7da2d43ab3f8307c9b26
[simgrid.git] / src / cxx / Environment.hpp
1 #ifndef MSG_ENVIRONMENT_HPP\r
2 #define MSG_ENVIRONMENT_HPP\r
3 \r
4 #ifndef __cplusplus\r
5         #error Environment.hpp requires C++ compilation (use a .cxx suffix)\r
6 #endif\r
7 \r
8 #include <InvalidParameterException.hpp>\r
9 #include <LogicException.hpp>\r
10 #include <MsgException.hpp>\r
11 \r
12 \r
13 namespace SimGrid\r
14 {\r
15         namespace Msg\r
16         {\r
17                 class Environment\r
18                 {\r
19                         public:\r
20                                 \r
21                                 Environment();\r
22                                 \r
23                                 Environment(const Environment& rEnvironment);\r
24                                 \r
25                                 Environment(const char* file)\r
26                                 throw(InvalidArgumentException);\r
27                                 \r
28                                 virtual ~Environment();\r
29                                 \r
30                                 // Operations.\r
31                                 \r
32                                 void load(void)\r
33                                 throw(LogicException);\r
34                                 \r
35                                 void load(const char* file)\r
36                                 throw(InvalidArgumentException, LogicException);\r
37                                 \r
38                                 bool isLoaded(void) const;\r
39                                 \r
40                                 // Getters/setters\r
41                                 void setFile(const char* file)\r
42                                 throw(InvalidArgumentException, LogicException);\r
43                                 \r
44                                 const char* getFile(void) const;\r
45                                 \r
46                                 // Operators.\r
47                                 \r
48                                 const Environment& operator = (const Environment& rEnvironment)\r
49                                 throw(LogicException);\r
50                                 \r
51                         private:\r
52                                 \r
53                                 // Attributes.\r
54                                 \r
55                                 // the xml file which describe the environment of the simulation.\r
56                                 const char* file;\r
57                                 \r
58                                 // flag : is true the environment of the simulation is loaded.\r
59                                 bool loaded.\r
60                 };\r
61                 \r
62         } // namespace Msg\r
63 } // namespace SimGrid\r
64 \r
65 \r
66 #endif // !MSG_ENVIRONMENT_HPP