Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Some modifications and some files added.
[simgrid.git] / src / cxx / HostNotFoundException.hpp
diff --git a/src/cxx/HostNotFoundException.hpp b/src/cxx/HostNotFoundException.hpp
new file mode 100644 (file)
index 0000000..25d3330
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * HostNotFoundException.hpp\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_HOSTNOTFOUNDEXCEPTION_HPP\r
+#define MSG_HOSTNOTFOUNDEXCEPTION_HPP\r
+\r
+#include "Exception.hpp"\r
+\r
+namespace SimGrid\r
+{\r
+       namespace Msg\r
+       {\r
+               \r
+               class HostNotFoundException : public Exception\r
+               {\r
+                       public:\r
+                       \r
+                       // Default constructor.\r
+                               HostNotFoundException();\r
+                       \r
+                       // Copy constructor.\r
+                               HostNotFoundException(const HostNotFoundException& rHostNotFoundException);\r
+                       \r
+                       // This constructor takes the name of the host not found.\r
+                               HostNotFoundException(const char* name);\r
+                       \r
+                       // Destructor.\r
+                               virtual ~HostNotFoundException();\r
+                               \r
+                       // Operations.\r
+                                       \r
+                                       // Returns the reason of the exception :\r
+                                       // the message "Host not found `host name'"\r
+                                       const char* toString(void) const;\r
+                       \r
+                       // Operators.\r
+                               \r
+                               // Assignement.\r
+                               const HostNotFoundException& operator = (const HostNotFoundException& rHostNotFoundException);\r
+                               \r
+                       private :\r
+                       \r
+                       // Attributes.\r
+                               \r
+                               // A buffer used to build the message returned by the methode toString().\r
+                               char* reason;\r
+               };\r
+               \r
+               \r
+       } // namespace Msg      \r
+\r
+}// namespace SimGrid\r
+\r
+\r
+#endif // !MSG_HOSTNOTFOUNDEXCEPTION_HPP\r