\r
#include <msg/datatypes.h>\r
\r
-#include <Config.hpp>\r
+#include <InvalidArgumentException.hpp>\r
+#include <BadAllocException.hpp>\r
+#include <HostNotFoundException.hpp>\r
+#include <MsgException.hpp>\r
+#include <NullPointerException.hpp>\r
+\r
\r
\r
// namespace SimGrid::Msg\r
{\r
namespace Msg\r
{\r
- class InvalidArgumentException;\r
- class BadAllocException;\r
- class HostNotFoundException;\r
- class MsgException;\r
-\r
class Task;\r
class Process;\r
\r
// Declaration of the class SimGrid::Msg::Host.\r
class SIMGRIDX_EXPORT Host // final class.\r
{\r
- friend Process;\r
- friend Task;\r
+ friend class Process;\r
+ friend class Task;\r
\r
// Desable the default constructor.\r
// The best way to get an host instance is to use the static method Host::getByName().\r
* [BadAllocException] if there is not enough memory to allocate the host.\r
*/ \r
static Host& getByName(const char* hostName)\r
- throw(HostNotFoundException, InvalidArgumentException, BadAllocException);\r
+ throw(HostNotFoundException, NullPointerException, BadAllocException);\r
\r
/*! \brief Host::getNumber() - returns the number of the installed hosts.\r
*\r
*\r
* \see Process::currentProcess().\r
*/\r
- static Host& currentHost(void)\r
- throw(InvalidArgumentException, BadAllocException);\r
+ static Host& currentHost(void);\r
\r
/*! \brief Host::all() - This static method retrieves all of the hosts of the installed platform.\r
*\r
* delete[] ar;\r
*\r
*/ \r
- static void all(Host*** hosts /*in|out*/, int* len /*in|out*/);\r
+ static void all(Host*** hosts /*in|out*/, int* len /*in|out*/)\r
+ throw(InvalidArgumentException, BadAllocException) ;\r
\r
/*! \brief Host::getName() - This method return the name of the Msg host object.\r
*\r
* [InvalidArgumentException] if the value of the channel specified as\r
* parameter is negative.\r
*/\r
- void put(int channel, const Task& rTask)\r
- throw(MsgException, InvalidArgumentException);\r
-\r
- void Host::put(int channel, Task* task) \r
+ void put(int channel, Task* task) \r
throw(MsgException, InvalidArgumentException);\r
\r
/* ! \brief Host::put() - put a task on the given channel of a host object (waiting at most timeout seconds).\r
*\r
* \remark To specify no timeout set the timeout value with -1.0.\r
*/\r
- void put(int channel, const Task& rTask, double timeout) \r
+ void put(int channel, Task* task, double timeout) \r
throw(MsgException, InvalidArgumentException);\r
\r
/* ! \brief Host::putBounded() - put a task on the given channel of a host object (capping the emission rate to maxrate).\r
*\r
* \remark To specify no rate set the maxRate parameter value with -1.0.\r
*/\r
- void putBounded(int channel, const Task& rTask, double maxRate) \r
+ void putBounded(int channel, Task* task, double maxRate) \r
throw(MsgException, InvalidArgumentException);\r
\r
/* ! brief Host::send() - sends the given task to mailbox identified by the default alias.\r
* the default alias variable.\r
* [MsgException] if an internal error occurs.\r
*/\r
- void send(const Task& rTask) \r
- throw(BadAllocException, MsgException);\r
+ void send(Task* task) \r
+ throw(MsgException, BadAllocException);\r
\r
/* ! brief Host::send() - sends the given task to mailbox identified by the specified alias parameter.\r
*\r
* the default alias variable.\r
* [MsgException] if an internal error occurs.\r
*/\r
- void send(const char* alias, const Task& rTask) \r
- throw(InvalidArgumentException, BadAllocException, MsgException);\r
+ void send(const char* alias, Task* task) \r
+ throw(InvalidArgumentException, MsgException);\r
\r
/* ! brief Host::send() - sends the given task to mailbox identified by the default alias\r
* (waiting at most timeout seconds).\r
* version of this method.\r
*\r
*/\r
- void send(const Task& rTask, double timeout) \r
- throw(MsgException);\r
+ void send(Task* task, double timeout) \r
+ throw(InvalidArgumentException, BadAllocException, MsgException);\r
\r
/* ! brief Host::send() - sends the given task to mailbox identified by the parameter alias\r
* (waiting at most timeout seconds).\r
* version of this method.\r
*\r
*/\r
- void send(const char* alias, const Task& rTask, double timeout) \r
+ void send(const char* alias, Task* task, double timeout) \r
throw(InvalidArgumentException, MsgException);\r
\r
/* ! brief Host::sendBounded() - sends the given task to mailbox associated to the default alias\r
* \remark To specify no rate set its value with -1.0.\r
*\r
*/\r
- void sendBounded(const Task& rTask, double maxRate) \r
+ void sendBounded(Task* task, double maxRate) \r
throw(InvalidArgumentException, BadAllocException, MsgException);\r
\r
/* ! brief Host::sendBounded() - sends the given task to mailbox identified by the parameter alias\r
* \remark To specify no rate set its value with -1.0.\r
*\r
*/\r
- void sendBounded(const char* alias, const Task& rTask, double maxRate) \r
+ void sendBounded(const char* alias, Task* task, double maxRate) \r
throw(InvalidArgumentException, MsgException);\r
\r
protected:\r
} // namespace Msg\r
} // namespace SimGrid\r
\r
-#endif // !MSG_HOST_HPP
\ No newline at end of file
+#endif // !MSG_HOST_HPP\r