Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused variables.
[simgrid.git] / src / cxx / MsgException.hpp
index bcc3c44..b39fc12 100644 (file)
@@ -1,43 +1,65 @@
-#ifndef MSG_EXCEPTION_HPP\r
-#define MSG_EXCEPTION_HPP\r
-\r
-namespace msg\r
-{\r
-       class MsgException\r
-       {\r
-       public:\r
-               // Default constructor.\r
-               MsgException();\r
-               \r
-               // This constructor takes as parameter the message of the \r
-               // MsgException object.\r
-               MsgException(const char* msg);\r
-               \r
-               // Copy constructor.\r
-               MsgException(const MsgException& rMsgException);\r
-               \r
-               // Destructor.\r
-               virtual ~MsgException();\r
-               \r
-               \r
-       // Operations.\r
-       \r
-       // Returns the message of the exception.\r
-       const char* what(void) const;\r
-       \r
-       \r
-       // Getters/setters.\r
-       \r
-       // Operators.\r
-               \r
-       private:\r
-               \r
-               // Attributes.\r
-               \r
-               // The message of the exception.\r
-               const char* msg;\r
-               \r
-       };\r
-}\r
-\r
-#endif // !MSG_EXCEPTION_HPP
\ No newline at end of file
+/*
+ * MsgException.hpp
+ *
+ * Copyright 2006,2007 Martin Quinson, Malek Cherier           
+ * All right reserved. 
+ *
+ * This program is free software; you can redistribute 
+ * it and/or modify it under the terms of the license 
+ *(GNU LGPL) which comes with this package. 
+ *
+ */  
+#ifndef MSG_MSGEXCEPTION_HPP
+#define MSG_MSGEXCEPTION_HPP
+
+#include <Exception.hpp>
+
+namespace SimGrid
+{
+       namespace Msg
+       {
+               
+               class SIMGRIDX_EXPORT MsgException : public Exception
+               {
+                       public:
+                       
+                       // Default constructor.
+                               MsgException();
+                       
+                       // Copy constructor.
+                               MsgException(const MsgException& rMsgException);
+                       
+                       // This constructor takes the reason of the exception.
+                               MsgException(const char* reason);
+                       
+                       // Destructor.
+                               virtual ~MsgException();
+                               
+                       // Operations.
+                                       
+                                       // Returns the reason of the exception :
+                                       // the message "Internal exception `reason'"
+                                       const char* toString(void) const;
+                       
+                       // Operators.
+                               
+                               // Assignement.
+                               const MsgException& operator = (const MsgException& rMsgException);
+                               
+                       private :
+                       
+                       // Attributes.
+                               
+                               // A buffer used to build the message returned by the methode toString().
+                               char* reason;
+               };
+               
+               
+       } // namespace Msg      
+
+}// namespace SimGrid
+
+
+#endif // !MSG_MSGEXCEPTION_HPP
+