Logo AND Algorithmique Numérique Distribuée

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