+++ /dev/null
-/*\r
- * ClassNotFoundException.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
- /* ClassNotFoundException member functions implementation.\r
- */ \r
-\r
-#include <ClassNotFoundException.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
- ClassNotFoundException::ClassNotFoundException()\r
- {\r
- this->reason = (char*) calloc(strlen("Class not found : unknown") + 1, sizeof(char));\r
- strcpy(this->reason, "Class not found : unknown");\r
- }\r
- \r
- \r
- ClassNotFoundException::ClassNotFoundException(const ClassNotFoundException& rClassNotFoundException)\r
- {\r
- const char* reason = rClassNotFoundException.toString();\r
- this->reason = (char*) calloc(strlen(reason) + 1, sizeof(char));\r
- strcpy(this->reason, reason);\r
- \r
- }\r
- \r
- \r
- ClassNotFoundException::ClassNotFoundException(const char* name)\r
- {\r
- this->reason = (char*) calloc(strlen("Class not found : ") + strlen(name) + 1, sizeof(char));\r
- sprintf(this->reason, "Class not found : %s", name);\r
- }\r
- \r
- \r
- ClassNotFoundException::~ClassNotFoundException()\r
- {\r
- if(this->reason)\r
- free(this->reason);\r
- }\r
- \r
- const char* ClassNotFoundException::toString(void) const\r
- {\r
- return (const char*)(this->reason); \r
- }\r
- \r
- \r
- const ClassNotFoundException& ClassNotFoundException::operator = (const ClassNotFoundException& rClassNotFoundException)\r
- {\r
- const char* reason = rClassNotFoundException.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