Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 10, 2008, 4:34:20 PM (16 years ago)
Author:
landauf
Message:

added boolean bApplyLoaderMask to the XMLPortObject macro to determine whether the ClassTreeMask from the Loader should be applied or not (the idea is: objects included in excluded objects are excluded too, no matter what the mask sais. but objects included in a namespace or directly in a level-file are filtered by the mask.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/XMLPort.h

    r877 r878  
    5959    xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading)
    6060
    61 #define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading) \
     61#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading, bApplyLoaderMask) \
    6262    orxonox::XMLPortClassObjectContainer<classname, objectclass>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \
    6363    if (!xmlcontainer##loadfunction##savefunction) \
    6464    { \
    65         xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(this->getIdentifier()->getName(), std::string(sectionname), &classname::loadfunction, &classname::savefunction); \
     65        xmlcontainer##loadfunction##savefunction = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(this->getIdentifier()->getName(), std::string(sectionname), &classname::loadfunction, &classname::savefunction, bApplyLoaderMask); \
    6666        this->getIdentifier()->addXMLPortObjectContainer(sectionname, xmlcontainer##loadfunction##savefunction); \
    6767    } \
     
    196196            XMLPortObjectContainer& description(const std::string description);
    197197            const std::string& getDescription();
    198             static bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
     198            bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
    199199
    200200        protected:
    201201            std::string classname_;
    202202            std::string sectionname_;
     203            bool bApplyLoaderMask_;
    203204
    204205        private:
     
    211212    {
    212213        public:
    213             XMLPortClassObjectContainer(const std::string classname, const std::string sectionname, void (T::*loadfunction)(O*), const O* (T::*savefunction)(unsigned int) const)
     214            XMLPortClassObjectContainer(const std::string classname, const std::string sectionname, void (T::*loadfunction)(O*), const O* (T::*savefunction)(unsigned int) const, bool bApplyLoaderMask)
    214215            {
    215216                this->classname_ = classname;
     
    217218                this->loadfunction_ = loadfunction;
    218219                this->savefunction_ = savefunction;
     220                this->bApplyLoaderMask_ = bApplyLoaderMask;
    219221            }
    220222
Note: See TracChangeset for help on using the changeset viewer.