Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7570


Ignore:
Timestamp:
Oct 20, 2010, 3:50:05 PM (14 years ago)
Author:
rgrieder
Message:

Testing…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ois_update/src/libraries/core/BaseObject.h

    r7563 r7570  
    238238    };
    239239
    240     SUPER_FUNCTION(0, BaseObject, XMLPort, false);
     240    template <class T, int templatehack2>
     241    struct SuperFunctionCondition<0, T, 0, templatehack2>
     242    {
     243        static void verify()
     244        {
     245            SuperFunctionCondition<0, T, 0, templatehack2>::apply(static_cast<T*>(0));
     246            SuperFunctionCondition<0 + 1, T, 0, templatehack2>::verify();
     247        }
     248       
     249        static void apply(void* temp) {}
     250       
     251        static void apply(BaseObject* temp)
     252        {
     253            ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
     254            for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it)
     255            {
     256                if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_XMLPort_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_)
     257                {
     258                    delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_;
     259                    ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_ = 0;
     260                    ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_XMLPort_isFallback_ = false;
     261                }
     262               
     263                if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_)
     264                {
     265                    COUT(5) << "Added SuperFunctionCaller for " << "XMLPort" << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl;
     266                    ((ClassIdentifier<T>*)(*it))->superFunctionCaller_XMLPort_ = new SuperFunctionClassCaller_XMLPort <T>;
     267                }
     268            }
     269        }
     270    };
     271
     272
     273    //SUPER_FUNCTION(0, BaseObject, XMLPort, false);
    241274    SUPER_FUNCTION(2, BaseObject, changedActivity, false);
    242275    SUPER_FUNCTION(3, BaseObject, changedVisibility, false);
Note: See TracChangeset for help on using the changeset viewer.