git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5780
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
+/*\r
+ * Application.cxx\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
+ /* Application member functions implementation.\r
+ */ \r
+ \r
#include <Application.hpp>\r
#include <ApplicationHandler.hpp>\r
\r
#include <Application.hpp>\r
#include <ApplicationHandler.hpp>\r
\r
}\r
\r
Application::Application(const char* file)\r
}\r
\r
Application::Application(const char* file)\r
- throw(InvalidParameterException)\r
+ throw(NullPointerException, FileNotFoundException)\r
{\r
// check parameters\r
\r
if(!file)\r
{\r
// check parameters\r
\r
if(!file)\r
- throw InvalidParameterException("file (must not be NULL");\r
+ throw NullPointerException("file");\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
- throw InvalidParameterException("file (file not found)");\r
+ throw FileNotFoundException(file);\r
\r
this->file = file;\r
this->deployed = false;\r
\r
this->file = file;\r
this->deployed = false;\r
}\r
\r
Application::deploy(const char* file)\r
}\r
\r
Application::deploy(const char* file)\r
- throw(InvalidParameterException, LogicException, MsgException)\r
+ throw(NullPointerException, FileNotFoundException, LogicException, MsgException)\r
// check the parameters\r
\r
if(!file)\r
// check the parameters\r
\r
if(!file)\r
- throw InvalidParameterException("file (must not be NULL");\r
+ throw NullPointerException("file");\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
- throw InvalidParameterException("file (file not found)");\r
+ throw FileNotFoundException(file);\r
\r
surf_parse_reset_parser();\r
\r
surf_parse_reset_parser();\r
+ \r
+ // set the begin of the xml process element handler\r
surfxml_add_callback(STag_surfxml_process_cb_list, ApplicationHandler::onBeginProcess);\r
surfxml_add_callback(STag_surfxml_process_cb_list, ApplicationHandler::onBeginProcess);\r
+ \r
+ // set the process arg handler\r
surfxml_add_callback(ETag_surfxml_argument_cb_list, ApplicationHandler::onArg);\r
surfxml_add_callback(ETag_surfxml_argument_cb_list, ApplicationHandler::onArg);\r
+ \r
+ // set the properties handler\r
surfxml_add_callback(STag_surfxml_prop_cb_list, ApplicationHandler::OnProperty);\r
surfxml_add_callback(STag_surfxml_prop_cb_list, ApplicationHandler::OnProperty);\r
+ \r
+ // set the end of the xml process element handler\r
surfxml_add_callback(ETag_surfxml_process_cb_list, ApplicationHandler::OnEndProcess);\r
\r
surf_parse_open(file);\r
\r
surfxml_add_callback(ETag_surfxml_process_cb_list, ApplicationHandler::OnEndProcess);\r
\r
surf_parse_open(file);\r
\r
+ // initialize the process factory used by the process handler to build the processes.\r
+ ApplicationHandler::onStartDocument();\r
+ \r
if(surf_parse())\r
throw MsgException("surf_parse() failed");\r
\r
if(surf_parse())\r
throw MsgException("surf_parse() failed");\r
\r
+ surf_parse_close();\r
+ \r
+ // release the process factory\r
+ ApplicationHandler::onEndDocument(); \r
\r
this->file = file;\r
this->deployed = true;\r
\r
this->file = file;\r
this->deployed = true;\r
}\r
\r
void Application::setFile(const char* file)\r
}\r
\r
void Application::setFile(const char* file)\r
- throw (InvalidParameterException, LogicException)\r
+ throw (NullPointerException, FileNotFoundException, LogicException)\r
// check parameters\r
\r
if(!file)\r
// check parameters\r
\r
if(!file)\r
- throw InvalidParameterException("file (must not be NULL");\r
+ throw NullPointerException("file");\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
\r
struct stat statBuf = {0};\r
\r
if(stat(statBuff, &info) < 0 || !S_ISREG(statBuff.st_mode))\r
- throw InvalidParameterException("file (file not found)");\r
+ throw FileNotFoundException("file (file not found)");\r
\r
this->file = file;\r
\r
\r
this->file = file;\r
\r
+/*\r
+ * Application.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_APPLICATION_HPP\r
#define MSG_APPLICATION_HPP\r
\r
#ifndef MSG_APPLICATION_HPP\r
#define MSG_APPLICATION_HPP\r
\r
#error Application.hpp requires C++ compilation (use a .cxx suffix)\r
#endif\r
\r
#error Application.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
#include <LogicException.hpp>\r
#include <MsgException.hpp>\r
\r
+ // Application wrapper class declaration.\r
class Application\r
{\r
public:\r
\r
class Application\r
{\r
public:\r
\r
- // Default constructor.\r
+ /*! \brief Default constructor.\r
+ */\r
Application();\r
\r
/*! \brief Copy constructor.\r
Application();\r
\r
/*! \brief Copy constructor.\r
\r
/* \brief A constructor which takes as parameter the xml file of the application.\r
*\r
\r
/* \brief A constructor which takes as parameter the xml file of the application.\r
*\r
- * \exception [InvalidParameterException] if the parameter file is invalid\r
- * (NULL or if the file does not exist).\r
+ * \exception If this constructor fails, it throws on of the exceptions described\r
+ * below:\r
+ * \r
+ * [NullPointerException] if the parameter file is NULL.\r
+ *\r
+ * [FileNotFoundException] if the file is not found.\r
*/\r
Application(const char* file)\r
*/\r
Application(const char* file)\r
- throw(InvalidParameterException);\r
+ throw(NullPointerException, FileNotFoundException);\r
\r
/*! \brief Destructor.\r
*/\r
\r
/*! \brief Destructor.\r
*/\r
\r
/*! \brief Application::deploy() - deploy the appliction.\r
*\r
\r
/*! \brief Application::deploy() - deploy the appliction.\r
*\r
- * \return If successfuly the application is deployed. Otherwise\r
- * the method throws an exception listed below.\r
+ * \exception If this method fails, it throws an exception listed below:\r
*\r
* \exception [LogicException] if the xml file which describes the application\r
* is not yet specified or if the application is already\r
*\r
* \exception [LogicException] if the xml file which describes the application\r
* is not yet specified or if the application is already\r
void deploy(void)\r
throw(LogicExeption, MsgException);\r
\r
void deploy(void)\r
throw(LogicExeption, MsgException);\r
\r
- /*! \brief Application::deploy() - deploy the appliction.\r
+ /*! \brief Application::deploy() - Deploy the appliction.\r
*\r
* \return If successfuly the application is deployed. Otherwise\r
* the method throws an exception listed below.\r
*\r
*\r
* \return If successfuly the application is deployed. Otherwise\r
* the method throws an exception listed below.\r
*\r
- * \exception [InvalidParameterException] if the parameter file is invalid\r
- * (NULL or not a xml deployment file name).\r
+ * \exception [NullPointerException] if the parameter file is NULL.\r
+ * \r
+ * [FileNotFoundException] if the file is not found.\r
+ *\r
* [MsgException] if a internal exception occurs.\r
* [MsgException] if a internal exception occurs.\r
* [LogicException] if the application is already deployed.\r
*\r
* \\r
*/\r
void deploy(const char* file)\r
* [LogicException] if the application is already deployed.\r
*\r
* \\r
*/\r
void deploy(const char* file)\r
- throw(InvalidParameterException, LogicException, MsgException);\r
+ throw(NullPointerException, FileNotFoundException, LogicException, MsgException);\r
- /*! \brief Application::isDeployed() - tests if the application is deployed.\r
+ /*! \brief Application::isDeployed() - Tests if the application is deployed.\r
*\r
* \return This method returns true is the application is deployed.\r
* Otherwise the method returns false.\r
*\r
* \return This method returns true is the application is deployed.\r
* Otherwise the method returns false.\r
\r
/*! \brief Application::setFile() - this setter sets the value of the file of the application.\r
*\r
\r
/*! \brief Application::setFile() - this setter sets the value of the file of the application.\r
*\r
- * \return If successful, the value of the file of the application is setted.\r
- * Otherwise the method throws on of the exceptions listed below.\r
+ * \exception If this method fails, it throws on of the exceptions listed below:\r
+ *\r
+ * [NullPointerException] if the parameter file is NULL.\r
- * \exception [InvalidParameterException] if the parameter file is invalid\r
- * (NULL or does no exist).\r
+ * [FileNotFoundException] if the file is not found.\r
+ \r
* [LogicException] if you try to set the value of the file of an\r
* application which is already deployed.\r
*/\r
void setFile(const char* file)\r
* [LogicException] if you try to set the value of the file of an\r
* application which is already deployed.\r
*/\r
void setFile(const char* file)\r
- throw (InvalidParameterException, LogicException);\r
+ throw (NullPointerException, FileNotFoundException, LogicException);\r
- /*! \brief Application::getFile() - this getter returns the file of an application object.\r
+ /*! \brief Application::getFile() - This getter returns the name of the xml file which describes the \r
+ * application of the simulation.\r
*/\r
const char* getFile(void) const;\r
\r
*/\r
const char* getFile(void) const;\r
\r
\r
// flag : if true the application was deployed.\r
bool deployed;\r
\r
// flag : if true the application was deployed.\r
bool deployed;\r
- // the xml file which describe the application.\r
- const char* file;\r
+ // the xml file which describes the application of the simulation.\r
+ const char* file;\r
};\r
\r
} // namespace Msg\r
};\r
\r
} // namespace Msg\r
+/*\r
+ * ApplicationHandler.cxx\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
+ /* ApplicationHandler member functions implementation.\r
+ */ \r
+ \r
#include <ApplicationHandler.hpp>\r
\r
namespace SimGrid\r
#include <ApplicationHandler.hpp>\r
\r
namespace SimGrid\r
void ApplicationHandler::onStartDocument(void)\r
{\r
// instanciate the factory at the begining of the parsing\r
void ApplicationHandler::onStartDocument(void)\r
{\r
// instanciate the factory at the begining of the parsing\r
\r
// create the cxx process wrapper.\r
void ApplicationHandler::ProcessFactory::createProcess() \r
\r
// create the cxx process wrapper.\r
void ApplicationHandler::ProcessFactory::createProcess() \r
+ throw (ClassNotFoundException, HostNotFoundException)\r
{\r
Host host;\r
Process* process;\r
\r
{\r
Host host;\r
Process* process;\r
\r
- // dynamic creation of a instance fo the process from its name (which is specified by the element function\r
+ // try to dynamicaly create an instance fo the process from its name (which is specified by the element function\r
// in the xml application file.\r
// in the xml application file.\r
- try\r
- {\r
- process = (Process*)Class::fromName(this->function);\r
- }\r
- catch(ClassNotFoundException e)\r
- {\r
- cerr << e.toString(); \r
- }\r
+ // if this static method fails, it throws an exception of the class ClassNotFoundException\r
+ process = (Process*)Class::fromName(this->function);\r
\r
// try to retrieve the host of the process from its name\r
\r
// try to retrieve the host of the process from its name\r
- try\r
- {\r
- host = Host::getByName(this->hostName); \r
- }\r
- catch(HostNotFoundException(this->hostName))\r
- {\r
- cerr << e.toString();\r
- }\r
- \r
+ // if this method fails, it throws an exception of the class HostNotFoundException\r
+ host = Host::getByName(this->hostName); \r
\r
// build the list of the arguments of the newly created process.\r
int argc = xbt_dynar_length(this->args);\r
\r
// build the list of the arguments of the newly created process.\r
int argc = xbt_dynar_length(this->args);\r
+/*\r
+ * ApplicationHandler.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_APPLICATION_HANDLER_HPP\r
#define MSG_APPLICATION_HANDLER_HPP\r
\r
#ifndef MSG_APPLICATION_HANDLER_HPP\r
#define MSG_APPLICATION_HANDLER_HPP\r
\r
+#include <ClassNotFoundException.hpp>\r
+#include <HostNotFoundException.hpp>\r
+\r
namespace SimGrid\r
{\r
namespace Msg\r
{\r
namespace SimGrid\r
{\r
namespace Msg\r
{\r
- // Declaration of the class ApplicationHandler.\r
+ // Declaration of the class ApplicationHandler (Singleton).\r
class ApplicationHandler\r
{\r
private :\r
class ApplicationHandler\r
{\r
private :\r
const const char* getHostName(void);\r
\r
// Create the current process.\r
const const char* getHostName(void);\r
\r
// Create the current process.\r
- void createProcess(void); \r
+ void createProcess(void)\r
+ throw (ClassNotFoundException, HostNotFoundException); \r
\r
};\r
\r
// the process factory used by the application handler.\r
static ProcessFactory* processFactory;\r
\r
\r
};\r
\r
// the process factory used by the application handler.\r
static ProcessFactory* processFactory;\r
\r
public:\r
\r
// Handle the begining of the parsing of the xml file describing the application.\r
public:\r
\r
// Handle the begining of the parsing of the xml file describing the application.\r
+/*\r
+ * Environment.cxx\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
+ /* Environment member functions implementation.\r
+ */ \r
+ \r
#include <Environment.hpp>\r
\r
#include <sys/types.h>\r
#include <Environment.hpp>\r
\r
#include <sys/types.h>\r
+ // Environment class wrapper declaration\r
class Environment\r
{\r
public:\r
class Environment\r
{\r
public:\r
\r
// Dynamic name lookup and creation\r
Class* Class::fromName(const char* name)\r
\r
// Dynamic name lookup and creation\r
Class* Class::fromName(const char* name)\r
+throw (ClassNotFoundException)\r
throw(HostNotFoundException)\r
{\r
smx_process_t nativeCurrentProcess = NULL;\r
throw(HostNotFoundException)\r
{\r
smx_process_t nativeCurrentProcess = NULL;\r
- nativeProcess = xbt_new0(s_smx_process_t, 1);\r
+ \r
+ // allocate the native process\r
+ this->nativeProcess = xbt_new0(s_smx_process_t, 1);\r
+ \r
+ // allocate the simulation data of the native process\r
smx_simdata_process_t simdata = xbt_new0(s_smx_simdata_process_t, 1);\r
smx_simdata_process_t simdata = xbt_new0(s_smx_simdata_process_t, 1);\r
+ \r
+ // try to retrieve the host where to createt the process from its name\r
smx_host_t nativeHost = SIMIX_host_get_by_name(rHost.getName());\r
\r
smx_host_t nativeHost = SIMIX_host_get_by_name(rHost.getName());\r
\r
- throw HostNotFoundException(rHost.getName());\r
+ if(!nativeHost)\r
+ throw HostNotFoundException(rHost.getName());\r
+ // realloc the list of the argument to add the pointer to this process instance at the end\r
argv = (char**)realloc(argc + 1, sizeo(char*));\r
\r
argv = (char**)realloc(argc + 1, sizeo(char*));\r
\r
+ // add the pointer to this instance at the end of the list of the arguments of the process\r
+ // so the static method Process::run() (passed as argument of the MSG function xbt_context_new())\r
+ // can retrieve the concerned process object by the run\r
+ // so Process::run() can call the method main() of the good process\r
+ // for more detail see Process::run() method\r
argv[argc] = (char*)this;\r
\r
// Simulator Data\r
argv[argc] = (char*)this;\r
\r
// Simulator Data\r
simdata->cond = NULL;\r
simdata->argc = argc;\r
simdata->argv = argv;\r
simdata->cond = NULL;\r
simdata->argc = argc;\r
simdata->argv = argv;\r
+ \r
+ // create the context of the process.\r
simdata->context = xbt_context_new(name, Process::run, NULL, NULL, simix_global->cleanup_process_function, nativeProcess, simdata->argc, simdata->argv);\r
\r
/* Process structure */\r
simdata->context = xbt_context_new(name, Process::run, NULL, NULL, simix_global->cleanup_process_function, nativeProcess, simdata->argc, simdata->argv);\r
\r
/* Process structure */\r
- nativeProcess->name = xbt_strdup(name);\r
- nativeProcess->simdata = simdata;\r
+ this->nativeProcess->name = xbt_strdup(name);\r
+ this->nativeProcess->simdata = simdata;\r
- nativeProcess->data = NULL;\r
+ this->nativeProcess->data = NULL;\r
\r
// Set process properties\r
simdata->properties = NULL;\r
\r
\r
// Set process properties\r
simdata->properties = NULL;\r
\r
- xbt_swag_insert(nativeProcess, nativeHost->simdata->process_list);\r
+ xbt_swag_insert(this->nativeProcess, nativeHost->simdata->process_list);\r
\r
/* fix current_process, about which xbt_context_start mocks around */\r
nativeCurrentProcess = simix_global->current_process;\r
\r
/* fix current_process, about which xbt_context_start mocks around */\r
nativeCurrentProcess = simix_global->current_process;\r
- xbt_context_start(nativeProcess->simdata->context);\r
+ xbt_context_start(this->nativeProcess->simdata->context);\r
simix_global->current_process = nativeCurrentProcess;\r
\r
simix_global->current_process = nativeCurrentProcess;\r
\r
- xbt_swag_insert(nativeProcess, simix_global->process_list);\r
- DEBUG2("Inserting %s(%s) in the to_run list", nativeProcess->name, nativeHost->name);\r
- xbt_swag_insert(nativeProcess, simix_global->process_to_run);\r
+ xbt_swag_insert(this->nativeProcess, simix_global->process_list);\r
+ DEBUG2("Inserting %s(%s) in the to_run list", this->nativeProcess->name, nativeHost->name);\r
+ xbt_swag_insert(this->nativeProcess, simix_global->process_to_run);\r
}\r
\r
Process& Process::fromNativeProcess(m_process_t nativeProcess)\r
}\r
\r
Process& Process::fromNativeProcess(m_process_t nativeProcess)\r
\r
int Process::run(int argc, char** argv)\r
{\r
\r
int Process::run(int argc, char** argv)\r
{\r
- Process* process =(Process*)argv[argc];\r
- return process->main(argc, argv);\r
+ // the last argument of the process is the pointer to the process to run\r
+ // for mor detail see Process::create() method\r
+ return ((Process*)argv[argc])->main(argc, argv);\r
}\r
\r
} // namespace Msg\r
}\r
\r
} // namespace Msg\r
+/*\r
+ * Simulation.cxx\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
+ /* Simulation member functions implementation.\r
+ */ \r
+ \r
#include <Simulation.hpp>\r
\r
#include <Simulation.hpp>\r
\r
-#include <Simulator.hpp>\r
-\r
namespace SimGrid\r
{\r
namespace Msg\r
{\r
namespace SimGrid\r
{\r
namespace Msg\r
{\r
int Simulation::execute(int argc, char** argv)\r
{\r
if(argc < 3) \r
int Simulation::execute(int argc, char** argv)\r
{\r
if(argc < 3) \r
init(argc, argv);\r
\r
// the environment to load\r
init(argc, argv);\r
\r
// the environment to load\r
- Environment environment;\r
\r
// the application to deploy\r
\r
// the application to deploy\r
- Application application;\r
- \r
- // the simulation\r
- Simulation simulation;\r
\r
// try to load the environment described by the xml file (argv[1])\r
try\r
{\r
\r
// try to load the environment described by the xml file (argv[1])\r
try\r
{\r
- environment.load(argv[1]);\r
- }\r
- catch(InvalidArgumentException e)\r
- {\r
- info(e.toString());\r
- finalize();\r
- return 1;\r
- catch(LogicException e)\r
+ catch(FileNotFoundException e)\r
{\r
info(e.toString());\r
finalize();\r
return 1;\r
}\r
\r
{\r
info(e.toString());\r
finalize();\r
return 1;\r
}\r
\r
// try to deploy the application described by the xml file deployment (argv[2])\r
try\r
{\r
// try to deploy the application described by the xml file deployment (argv[2])\r
try\r
{\r
- application.deploy(argv[2]);\r
- catch(InvalidArgumentException e)\r
- {\r
- info(e.toString());\r
- finalize();\r
- return 1;\r
- }\r
- catch(LogicException e)\r
+ app.deploy(argv[2]);\r
+ catch(FileNotFoundException e)\r
{\r
info(e.toString());\r
finalize();\r
{\r
info(e.toString());\r
finalize();\r
//try to run the simulation the given application on the given environment\r
try\r
{\r
//try to run the simulation the given application on the given environment\r
try\r
{\r
- simulation.run(environment, application);\r
}\r
catch(MsgException e)\r
{\r
}\r
catch(MsgException e)\r
{\r
}\r
\r
// finalize the MSG simulator\r
}\r
\r
// finalize the MSG simulator\r
try\r
{\r
finalize();\r
}\r
try\r
{\r
finalize();\r
}\r
+ catch(MsgException e)\r
{\r
info(e.toString())\r
return 1;\r
{\r
info(e.toString())\r
return 1;\r
- void run(const Environment& rEnvironment, const Application& rApplication)\r
+ void Simulation::run(void)\r
throw (MsgException)\r
{\r
if(MSG_OK != MSG_main())\r
throw (MsgException)\r
{\r
if(MSG_OK != MSG_main())\r
-#ifndef MSG_ENVIRONMENT_HPP\r
-#define MSG_ENVIRONMENT_HPP\r
+/*\r
+ * Simulation.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_SIMULATION_HPP\r
+#define MSG_SIMULATION_HPP\r
\r
#ifndef __cplusplus\r
#error Sumulation.hpp requires C++ compilation (use a .cxx suffix)\r
\r
#ifndef __cplusplus\r
#error Sumulation.hpp requires C++ compilation (use a .cxx suffix)\r
+ // Simulation class declaration.\r
class Simulation\r
{\r
public :\r
class Simulation\r
{\r
public :\r
\r
int execute(int argc, char** argv);\r
\r
\r
int execute(int argc, char** argv);\r
\r
- void run(const Environment& rEnvironment, const Application& rApplication)\r
+ private:\r
+ \r
+ void run(void)\r
throw (MsgException);\r
\r
\r
// Operators.\r
throw (MsgException);\r
\r
\r
// Operators.\r
const Simulation& operator = (const Simulation& rSimulation);\r
const Simulation& operator = (const Simulation& rSimulation);\r
};\r
\r
} // namespace Msg\r
} // namespace SimGrid\r
\r
};\r
\r
} // namespace Msg\r
} // namespace SimGrid\r
\r
-\r
-#endif // !MSG_ENVIRONMENT_HPP
\ No newline at end of file
+#endif // !MSG_SIMULATION_HPP
\ No newline at end of file