Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Some new classes of CPP version of Msg
[simgrid.git] / src / cxx / 0bject.hpp
index cf0b8d1..9c8a169 100644 (file)
@@ -5,11 +5,13 @@
 \r
 // Compilation C++ recquise\r
 #ifndef __cplusplus\r
-       #error object.hpp requires C++ compilation (use a .cxx suffix)\r
+       #error Object.hpp requires C++ compilation (use a .cxx suffix)\r
 #endif\r
 \r
 #include <stdlib.h>\r
 \r
+#include <ClassNotFoundException.hpp>\r
+\r
 namespace msg\r
 {\r
                //////////////////////////////////////////////////////////////////////////////\r
@@ -35,7 +37,7 @@ namespace msg
                                 { return MSG_GET_CLASS(class_name); } \\r
                \r
                // CreateObject implementation. \r
-               #define HX_IMPLEMENT_DYNAMIC(class_name, base_class_name) \\r
+               #define MSG_IMPLEMENT_DYNAMIC(class_name, base_class_name) \\r
                        Object* class_name::createObject() \\r
                                { return (Object*)(new class_name); } \\r
                        DeclaringClass _declaringClass_##class_name(MSG_GET_CLASS(class_name)); \\r
@@ -97,7 +99,8 @@ namespace msg
                // Operations\r
                \r
                        // Create the runtime class from its name.\r
-                       static Class* fromName(const char* name);\r
+                       static Class* fromName(const char* name)\r
+                       throw (ClassNotFoundException);\r
                        \r
                        // Create an object from the name of the its class.\r
                        static Object* createObject(const char* name);\r