[Orxonox-commit 2867] r7570 - code/branches/ois_update/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Wed Oct 20 15:50:05 CEST 2010
Author: rgrieder
Date: 2010-10-20 15:50:05 +0200 (Wed, 20 Oct 2010)
New Revision: 7570
Modified:
code/branches/ois_update/src/libraries/core/BaseObject.h
Log:
Testing...
Modified: code/branches/ois_update/src/libraries/core/BaseObject.h
===================================================================
--- code/branches/ois_update/src/libraries/core/BaseObject.h 2010-10-20 13:47:12 UTC (rev 7569)
+++ code/branches/ois_update/src/libraries/core/BaseObject.h 2010-10-20 13:50:05 UTC (rev 7570)
@@ -237,7 +237,40 @@
bool bRegisteredEventStates_; //!< Becomes true after the object registered its event states (with XMLEventPort)
};
- SUPER_FUNCTION(0, BaseObject, XMLPort, false);
+ template <class T, int templatehack2>
+ struct SuperFunctionCondition<0, T, 0, templatehack2>
+ {
+ static void verify()
+ {
+ SuperFunctionCondition<0, T, 0, templatehack2>::apply(static_cast<T*>(0));
+ SuperFunctionCondition<0 + 1, T, 0, templatehack2>::verify();
+ }
+
+ static void apply(void* temp) {}
+
+ static void apply(BaseObject* temp)
+ {
+ ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
+ for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it)
+ {
+ if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_XMLPort_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_)
+ {
+ delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_;
+ ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_ = 0;
+ ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_XMLPort_isFallback_ = false;
+ }
+
+ if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_)
+ {
+ COUT(5) << "Added SuperFunctionCaller for " << "XMLPort" << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl;
+ ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_ = new SuperFunctionClassCaller_XMLPort <T>;
+ }
+ }
+ }
+ };
+
+
+ //SUPER_FUNCTION(0, BaseObject, XMLPort, false);
SUPER_FUNCTION(2, BaseObject, changedActivity, false);
SUPER_FUNCTION(3, BaseObject, changedVisibility, false);
SUPER_FUNCTION(4, BaseObject, XMLEventPort, false);
More information about the Orxonox-commit
mailing list