1 #ifndef MSG_APPLICATION_HPP
\r
2 #define MSG_APPLICATION_HPP
\r
5 #error Application.hpp requires C++ compilation (use a .cxx suffix)
\r
8 #include <InvalidParameterException.hpp>
\r
9 #include <LogicException.hpp>
\r
10 #include <MsgException.hpp>
\r
20 // Default constructor.
\r
23 /*! \brief Copy constructor.
\r
25 Application(const Application& rApplication);
\r
27 /* \brief A constructor which takes as parameter the xml file of the application.
\r
29 * \exception [InvalidParameterException] if the parameter file is invalid
\r
30 * (NULL or if the file does not exist).
\r
32 Application(const char* file)
\r
33 throw(InvalidParameterException);
\r
35 /*! \brief Destructor.
\r
37 virtual ~Application();
\r
41 /*! \brief Application::deploy() - deploy the appliction.
\r
43 * \return If successfuly the application is deployed. Otherwise
\r
44 * the method throws an exception listed below.
\r
46 * \exception [LogicException] if the xml file which describes the application
\r
47 * is not yet specified or if the application is already
\r
49 * [MsgException] if a internal exception occurs.
\r
51 * \remark Before use this method, you must specify the xml file of the application to
\r
54 * \see Application::setFile()
\r
58 throw(LogicExeption, MsgException);
\r
60 /*! \brief Application::deploy() - deploy the appliction.
\r
62 * \return If successfuly the application is deployed. Otherwise
\r
63 * the method throws an exception listed below.
\r
65 * \exception [InvalidParameterException] if the parameter file is invalid
\r
66 * (NULL or not a xml deployment file name).
\r
67 * [MsgException] if a internal exception occurs.
\r
68 * [LogicException] if the application is already deployed.
\r
72 void deploy(const char* file)
\r
73 throw(InvalidParameterException, LogicException, MsgException);
\r
75 /*! \brief Application::isDeployed() - tests if the application is deployed.
\r
77 * \return This method returns true is the application is deployed.
\r
78 * Otherwise the method returns false.
\r
80 bool isDeployed(void) const;
\r
85 /*! \brief Application::setFile() - this setter sets the value of the file of the application.
\r
87 * \return If successful, the value of the file of the application is setted.
\r
88 * Otherwise the method throws on of the exceptions listed below.
\r
90 * \exception [InvalidParameterException] if the parameter file is invalid
\r
91 * (NULL or does no exist).
\r
92 * [LogicException] if you try to set the value of the file of an
\r
93 * application which is already deployed.
\r
95 void setFile(const char* file)
\r
96 throw (InvalidParameterException, LogicException);
\r
98 /*! \brief Application::getFile() - this getter returns the file of an application object.
\r
100 const char* getFile(void) const;
\r
104 /*! \brief Assignement operator.
\r
106 * \exception [LogicException] if you try to assign an application already deployed.
\r
108 const Application& operator = (const Application& rApplication)
\r
109 throw(LogicException);
\r
114 // flag : if true the application was deployed.
\r
116 // the xml file which describe the application.
\r
122 } // namespace SimGrid
\r
124 #endif // !MSG_APPLICATION_HPP