Changeset 878 for code/branches/core2/src
- Timestamp:
- Mar 10, 2008, 4:34:20 PM (17 years ago)
- Location:
- code/branches/core2/src/orxonox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/core/BaseObject.cc
r871 r878 52 52 this->bVisible_ = true; 53 53 this->level_ = 0; 54 this->namespace_ = 0; 54 55 } 55 56 -
code/branches/core2/src/orxonox/core/Loader.cc
r877 r878 33 33 #include "Debug.h" 34 34 #include "CoreIncludes.h" 35 #include "Namespace.h" 35 36 36 37 #include "util/tinyxml/ticpp.h" … … 120 121 if (identifier) 121 122 { 122 if ( Loader::currentMask_s.isIncluded(identifier))123 if (identifier->isA(Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier)) 123 124 { 124 125 COUT(4) << " fabricating " << child->Value() << "..." << std::endl; -
code/branches/core2/src/orxonox/core/Namespace.cc
r877 r878 37 37 { 38 38 RegisterObject(Namespace); 39 40 this->representingNamespace_ = 0; 39 41 } 40 42 … … 53 55 BaseObject::XMLPort(xmlelement, loading); 54 56 55 XMLPortObject(Namespace, BaseObject, "", loadObjects, saveObjects, xmlelement, loading );57 XMLPortObject(Namespace, BaseObject, "", loadObjects, saveObjects, xmlelement, loading, true); 56 58 } 57 59 -
code/branches/core2/src/orxonox/core/Namespace.h
r877 r878 51 51 private: 52 52 std::list<Namespace*> namespaces_; 53 Namespace* representingNamespace_; 53 54 }; 54 55 } -
code/branches/core2/src/orxonox/core/XMLPort.cc
r871 r878 29 29 #include "Language.h" 30 30 #include "Loader.h" 31 #include "Namespace.h" 32 #include "CoreIncludes.h" 31 33 32 34 namespace orxonox … … 65 67 { 66 68 this->bAddedDescription_ = false; 69 this->bApplyLoaderMask_ = false; 67 70 } 68 71 … … 86 89 bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier) 87 90 { 88 return Loader::currentMask_s.isIncluded(identifier);91 return ((!this->bApplyLoaderMask_) || identifier->isA(Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier)); 89 92 } 90 93 } -
code/branches/core2/src/orxonox/core/XMLPort.h
r877 r878 59 59 xmlcontainer##loadfunction##savefunction->port(this, xmlelement, loading) 60 60 61 #define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading ) \61 #define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, loading, bApplyLoaderMask) \ 62 62 orxonox::XMLPortClassObjectContainer<classname, objectclass>* xmlcontainer##loadfunction##savefunction = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \ 63 63 if (!xmlcontainer##loadfunction##savefunction) \ 64 64 { \ 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); \ 66 66 this->getIdentifier()->addXMLPortObjectContainer(sectionname, xmlcontainer##loadfunction##savefunction); \ 67 67 } \ … … 196 196 XMLPortObjectContainer& description(const std::string description); 197 197 const std::string& getDescription(); 198 staticbool identifierIsIncludedInLoaderMask(const Identifier* identifier);198 bool identifierIsIncludedInLoaderMask(const Identifier* identifier); 199 199 200 200 protected: 201 201 std::string classname_; 202 202 std::string sectionname_; 203 bool bApplyLoaderMask_; 203 204 204 205 private: … … 211 212 { 212 213 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) 214 215 { 215 216 this->classname_ = classname; … … 217 218 this->loadfunction_ = loadfunction; 218 219 this->savefunction_ = savefunction; 220 this->bApplyLoaderMask_ = bApplyLoaderMask; 219 221 } 220 222 -
code/branches/core2/src/orxonox/objects/WorldEntity.cc
r877 r878 182 182 XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, loading); 183 183 184 XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, loading );184 XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, loading, false); 185 185 } 186 186
Note: See TracChangeset
for help on using the changeset viewer.