Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
last change of cpp wrappers for msg
[simgrid.git] / src / cxx / LogicException.cxx
index e1594f2..b911229 100644 (file)
@@ -1,75 +1,75 @@
-/*\r
- * LogicException.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
- /* LogicException member functions implementation.\r
-  */  \r
-\r
-#include <LogicException.hpp>\r
-\r
-#include <string.h>\r
-#include <stdlib.h>\r
-#include <stdio.h>\r
-\r
-namespace SimGrid\r
-{\r
-       namespace Msg\r
-       {\r
-               \r
-                       LogicException::LogicException()\r
-                       {\r
-                               this->reason = (char*) calloc(strlen("Logic exception : no detail") + 1, sizeof(char));\r
-                               strcpy(this->reason, "Logic exception : no detail");\r
-                       }\r
-               \r
-               \r
-                       LogicException::LogicException(const LogicException& rLogicException)\r
-                       {\r
-                               const char* reason = rLogicException.toString();\r
-                               this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));\r
-                               strcpy(this->reason, reason);\r
-                               \r
-                       }\r
-               \r
-               \r
-                       LogicException::LogicException(const char* detail)\r
-                       {\r
-                               this->reason = (char*) calloc(strlen("Logic exception : ") + strlen(detail) + 1, sizeof(char));\r
-                               sprintf(this->reason, "Logic exception : %s", detail);\r
-                       }\r
-               \r
-               \r
-                       LogicException::~LogicException()\r
-                       {\r
-                               if(this->reason)\r
-                                       free(this->reason);\r
-                       }\r
-                               \r
-                       const char* LogicException::toString(void) const\r
-                       {\r
-                               return (const char*)(this->reason);     \r
-                       }\r
-               \r
-               \r
-                       const LogicException& LogicException::operator = (const LogicException& rLogicException)\r
-                       {\r
-                               const char* reason = rLogicException.toString();\r
-                               this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));\r
-                               \r
-                               return *this;\r
-                       }\r
-               \r
-       } // namespace Msg      \r
-\r
-}// namespace SimGrid\r
-\r
-\r
-\r
+/*
+ * LogicException.cxx
+ *
+ * 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. 
+ *
+ */
+ /* LogicException member functions implementation.
+  */  
+
+#include <LogicException.hpp>
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+namespace SimGrid
+{
+       namespace Msg
+       {
+               
+                       LogicException::LogicException()
+                       {
+                               this->reason = (char*) calloc(strlen("Logic exception : no detail") + 1, sizeof(char));
+                               strcpy(this->reason, "Logic exception : no detail");
+                       }
+               
+               
+                       LogicException::LogicException(const LogicException& rLogicException)
+                       {
+                               const char* reason = rLogicException.toString();
+                               this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
+                               strcpy(this->reason, reason);
+                               
+                       }
+               
+               
+                       LogicException::LogicException(const char* detail)
+                       {
+                               this->reason = (char*) calloc(strlen("Logic exception : ") + strlen(detail) + 1, sizeof(char));
+                               sprintf(this->reason, "Logic exception : %s", detail);
+                       }
+               
+               
+                       LogicException::~LogicException()
+                       {
+                               if(this->reason)
+                                       free(this->reason);
+                       }
+                               
+                       const char* LogicException::toString(void) const
+                       {
+                               return (const char*)(this->reason);     
+                       }
+               
+               
+                       const LogicException& LogicException::operator = (const LogicException& rLogicException)
+                       {
+                               const char* reason = rLogicException.toString();
+                               this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));
+                               
+                               return *this;
+                       }
+               
+       } // namespace Msg      
+
+}// namespace SimGrid
+
+
+