[Orxonox-commit 4989] r9658 - in code/branches/core6/src/libraries: core core/command core/input network tools

landauf at orxonox.net landauf at orxonox.net
Sun Aug 18 16:41:38 CEST 2013


Author: landauf
Date: 2013-08-18 16:41:37 +0200 (Sun, 18 Aug 2013)
New Revision: 9658

Modified:
   code/branches/core6/src/libraries/core/Core.cc
   code/branches/core6/src/libraries/core/command/Shell.cc
   code/branches/core6/src/libraries/core/command/Shell.h
   code/branches/core6/src/libraries/core/input/InputBuffer.cc
   code/branches/core6/src/libraries/network/NetworkFunction.cc
   code/branches/core6/src/libraries/tools/Shader.cc
   code/branches/core6/src/libraries/tools/Timer.cc
Log:
register remaining classes in framework

Modified: code/branches/core6/src/libraries/core/Core.cc
===================================================================
--- code/branches/core6/src/libraries/core/Core.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/core/Core.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -91,6 +91,9 @@
     SetCommandLineArgument(limitToCPU, 0).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is off = 0.");
 #endif
 
+    // register Core as an abstract class to avoid problems if the class hierarchy is created within Core-constructor
+    RegisterAbstractClass(Core).inheritsFrom(Class(Configurable));
+
     Core::Core(const std::string& cmdLine)
         : pathConfig_(NULL)
         , dynLibManager_(NULL)

Modified: code/branches/core6/src/libraries/core/command/Shell.cc
===================================================================
--- code/branches/core6/src/libraries/core/command/Shell.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/core/command/Shell.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -55,6 +55,8 @@
         const OutputLevel User = level::user_info;
     }
 
+    RegisterClassNoArgs(Shell);
+
     /**
         @brief Constructor: Initializes the values.
         @param consoleName The name of the shell - used to define the name of the soft-debug-level config-value

Modified: code/branches/core6/src/libraries/core/command/Shell.h
===================================================================
--- code/branches/core6/src/libraries/core/command/Shell.h	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/core/command/Shell.h	2013-08-18 14:41:37 UTC (rev 9658)
@@ -108,7 +108,7 @@
                 Hint
             };
 
-            Shell(const std::string& consoleName, bool bScrollable);
+            Shell(const std::string& consoleName = "", bool bScrollable = true);
             ~Shell();
 
             void setConfigValues();

Modified: code/branches/core6/src/libraries/core/input/InputBuffer.cc
===================================================================
--- code/branches/core6/src/libraries/core/input/InputBuffer.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/core/input/InputBuffer.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -34,6 +34,8 @@
 
 namespace orxonox
 {
+    RegisterClassNoArgs(InputBuffer);
+
     InputBuffer::InputBuffer()
     {
         RegisterRootObject(InputBuffer);

Modified: code/branches/core6/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/branches/core6/src/libraries/network/NetworkFunction.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/network/NetworkFunction.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -36,6 +36,11 @@
   std::map<NetworkFunctionPointer, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::functorMap_;
   std::map<uint32_t, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::idMap_;
 
+  // no suitable factory for NetworkFunctionBase (and children), so we declare it abstract
+  RegisterAbstractClass(NetworkFunctionBase).inheritsFrom(Class(Listable));
+  RegisterAbstractClass(NetworkFunctionStatic).inheritsFrom(Class(NetworkFunctionBase));
+  RegisterAbstractClass(NetworkMemberFunctionBase).inheritsFrom(Class(NetworkFunctionBase));
+
   NetworkFunctionBase::NetworkFunctionBase(const std::string& name)
   {
     RegisterRootObject(NetworkFunctionBase);

Modified: code/branches/core6/src/libraries/tools/Shader.cc
===================================================================
--- code/branches/core6/src/libraries/tools/Shader.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/tools/Shader.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -38,6 +38,8 @@
 
 namespace orxonox
 {
+    RegisterClassNoArgs(Shader);
+
     /**
         @brief Initializes the values and sets the scene manager.
     */

Modified: code/branches/core6/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/core6/src/libraries/tools/Timer.cc	2013-08-16 21:28:34 UTC (rev 9657)
+++ code/branches/core6/src/libraries/tools/Timer.cc	2013-08-18 14:41:37 UTC (rev 9658)
@@ -131,6 +131,8 @@
         }
     }
 
+    RegisterClassNoArgs(Timer);
+
     /**
         @brief Constructor: Sets the default-values.
     */




More information about the Orxonox-commit mailing list