Changeset 5651 in orxonox.OLD for trunk/src/util
- Timestamp:
- Nov 20, 2005, 5:14:27 PM (19 years ago)
- Location:
- trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/loading/load_param.cc
r5646 r5651 111 111 this->loadString = grabParameter(root, paramName); 112 112 this->object = object; 113 if ( loadString != NULL &&root != NULL)113 if (root != NULL) 114 114 { 115 115 this->executor = executor.clone(); … … 119 119 this->executor = NULL; 120 120 } 121 121 122 } 123 124 122 125 LoadParamBase::~LoadParamBase() 123 126 { 124 127 if (likely(this->executor != NULL)) 125 128 { 126 if (this->loadString!= NULL &&likely(this->object != NULL))127 this->executor->execute(this->object, this->loadString);129 if (likely(this->object != NULL)) 130 this->executor->execute(this->object, this->loadString); 128 131 129 132 delete this->executor; … … 175 178 const TiXmlNode* node; 176 179 177 if (root == NULL )180 if (root == NULL || parameterName == NULL) 178 181 return NULL; 179 182 assert( parameterName != NULL); -
trunk/src/util/loading/load_param.h
r5646 r5651 30 30 #include "tinyxml.h" 31 31 #include "executor/executor.h" 32 #include "executor/executor_specials.h" 32 33 33 34 #include "helper_functions.h" … … 51 52 #define LoadParamNEW(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \ 52 53 LoadParamBase(ROOT, PARAMETER_NAME, OBJECT, ExecutorObjective<CLASS>(&CLASS::FUNCTION)) 54 55 #define LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \ 56 LoadParamBase(ROOT, PARAMETER_NAME, OBJECT, ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME)) 53 57 54 58
Note: See TracChangeset
for help on using the changeset viewer.