+/*\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
#error Environment.hpp requires C++ compilation (use a .cxx suffix)\r
#endif\r
\r
-#include <InvalidParameterException.hpp>\r
+#include <NullPointerException.hpp>\r
+#include <FileNotFoundException.hpp>\r
#include <LogicException.hpp>\r
#include <MsgException.hpp>\r
\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(InvalidArgumentException);\r
+ throw(NullPointerException, FileNotFoundException);\r
\r
+ /*! \brief Destructor.\r
+ */\r
virtual ~Environment();\r
\r
- // Operations.\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(InvalidArgumentException, LogicException);\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
+ // 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(InvalidArgumentException, LogicException);\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
+ // 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