[Orxonox-commit 2868] r7571 - code/branches/ois_update/src/libraries/core

youngk at orxonox.net youngk at orxonox.net
Wed Oct 20 17:35:10 CEST 2010


Author: youngk
Date: 2010-10-20 17:35:10 +0200 (Wed, 20 Oct 2010)
New Revision: 7571

Modified:
   code/branches/ois_update/src/libraries/core/BaseObject.h
   code/branches/ois_update/src/libraries/core/PathConfig.cc
   code/branches/ois_update/src/libraries/core/Super.h
Log:
Changes to Super.h: Macro collision. Again.

Modified: code/branches/ois_update/src/libraries/core/BaseObject.h
===================================================================
--- code/branches/ois_update/src/libraries/core/BaseObject.h	2010-10-20 13:50:05 UTC (rev 7570)
+++ code/branches/ois_update/src/libraries/core/BaseObject.h	2010-10-20 15:35:10 UTC (rev 7571)
@@ -237,13 +237,20 @@
             bool                                bRegisteredEventStates_; //!< Becomes true after the object registered its event states (with XMLEventPort)
     };
 
+#ifdef csadasdasf
+struct CompilerError
+{
+   void CompilerError() {}
+};
+#endif
+
     template <class T, int templatehack2>
     struct SuperFunctionCondition<0, T, 0, templatehack2>
     {
-        static void verify()
+        static void superCheck()
         {
             SuperFunctionCondition<0, T, 0, templatehack2>::apply(static_cast<T*>(0));
-            SuperFunctionCondition<0 + 1, T, 0, templatehack2>::verify();
+            SuperFunctionCondition<0 + 1, T, 0, templatehack2>::superCheck();
         }
        
         static void apply(void* temp) {}

Modified: code/branches/ois_update/src/libraries/core/PathConfig.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/PathConfig.cc	2010-10-20 13:50:05 UTC (rev 7570)
+++ code/branches/ois_update/src/libraries/core/PathConfig.cc	2010-10-20 15:35:10 UTC (rev 7571)
@@ -94,7 +94,7 @@
 
 #elif defined(ORXONOX_PLATFORM_APPLE)
         char buffer[1024];
-        unsigned long path_len = 1023;
+        uint32_t path_len = 1023;
         if (_NSGetExecutablePath(buffer, &path_len))
             ThrowException(General, "Could not retrieve executable path.");
 

Modified: code/branches/ois_update/src/libraries/core/Super.h
===================================================================
--- code/branches/ois_update/src/libraries/core/Super.h	2010-10-20 13:50:05 UTC (rev 7570)
+++ code/branches/ois_update/src/libraries/core/Super.h	2010-10-20 15:35:10 UTC (rev 7571)
@@ -93,10 +93,10 @@
         template <class T, int templatehack2> \
         struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
         { \
-            static void verify() \
+            static void superCheck() \
             { \
                 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0)); \
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::verify(); \
+                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck(); \
             } \
             \
             static void apply(void* temp) {} \
@@ -131,9 +131,9 @@
         template <int templatehack2> \
         struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
         { \
-            static void verify() \
+            static void superCheck() \
             { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::verify(); \
+                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
             } \
         };
 
@@ -149,14 +149,14 @@
         template <class T, templatehack2>
         struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
         {
-            static void verify()
+            static void superCheck()
             {
                 // This call to the apply-function is the whole check. By calling the function with
                 // a T* pointer, the right function get's called.
                 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0));
 
-                // Go go the verify for of next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::verify();
+                // Go go the superCheck for of next super-function (functionnumber + 1)
+                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck();
             }
 
             // This function gets called if T is not a child of the baseclass.
@@ -201,10 +201,10 @@
         template <int templatehack2> \
         struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
         { \
-            // The verify function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
-            static void verify() \
+            // The superCheck function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
+            static void superCheck() \
             { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::verify(); \
+                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
             } \
         };
     */
@@ -302,7 +302,7 @@
         template <int functionnumber, class T, int templatehack1, int templatehack2>
         struct SuperFunctionCondition
         {
-            static void verify() {}
+            static void superCheck() {}
         };
 
         /**
@@ -337,9 +337,9 @@
             template <class T, int templatehack1, int templatehack2> \
             struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
             { \
-                static void verify() \
+                static void superCheck() \
                 { \
-                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::verify(); \
+                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck(); \
                 } \
             }; \
             \
@@ -420,10 +420,10 @@
         {
             // If this function gets called, the header-file of the super function is not
             // included, so this fallback template (templatehack not specialized) is used
-            static void verify()
+            static void superCheck()
             {
                 // Calls the condition-check of the next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::verify();
+                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck();
             }
         };
 
@@ -573,7 +573,7 @@
         // This get's called within the initialization of an Identifier
         virtual void createSuperFunctionCaller() const
         {
-            //SuperFunctionCondition<0, T, 0, 0>::verify();
+            //SuperFunctionCondition<0, T, 0, 0>::superCheck();
         }
 
 




More information about the Orxonox-commit mailing list