Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7560


Ignore:
Timestamp:
Oct 19, 2010, 11:22:55 PM (13 years ago)
Author:
rgrieder
Message:

De-macro'd a super function declaration in BaseObject.h with the hope of localising a compiler error.

File:
1 edited

Legend:

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

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