[847] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
[1056] | 3 | * > www.orxonox.net < |
---|
[847] | 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Fabian 'x3n' Landau |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _XMLPort_H__ |
---|
| 30 | #define _XMLPort_H__ |
---|
| 31 | |
---|
[1062] | 32 | #include "CorePrereqs.h" |
---|
| 33 | |
---|
[847] | 34 | #include "util/XMLIncludes.h" |
---|
| 35 | #include "util/MultiTypeMath.h" |
---|
[858] | 36 | #include "util/tinyxml/ticpp.h" |
---|
[1052] | 37 | #include "Executor.h" |
---|
[850] | 38 | #include "Debug.h" |
---|
[856] | 39 | #include "CoreIncludes.h" |
---|
| 40 | #include "BaseObject.h" |
---|
[847] | 41 | |
---|
| 42 | |
---|
[1052] | 43 | #define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, mode) \ |
---|
| 44 | XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, paramname, orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), #savefunction), xmlelement, mode) |
---|
| 45 | #define XMLPortParam_Template(classname, paramname, loadtemplate, loadfunction, savetemplate, savefunction, xmlelement, mode) \ |
---|
| 46 | XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, paramname, orxonox::createExecutor(orxonox::createFunctor loadtemplate (&classname::loadfunction), #loadfunction), orxonox::createExecutor(orxonox::createFunctor savetemplate (&classname::savefunction), #savefunction), xmlelement, mode) |
---|
[847] | 47 | |
---|
[1052] | 48 | #define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, mode) \ |
---|
| 49 | XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, paramname, orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), #loadfunction), 0, xmlelement, mode) |
---|
| 50 | #define XMLPortParamLoadOnly_Template(classname, paramname, loadtemplate, loadfunction, xmlelement, mode) \ |
---|
| 51 | XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, paramname, orxonox::createExecutor(orxonox::createFunctor loadtemplate (&classname::loadfunction), #loadfunction), 0, xmlelement, mode) |
---|
| 52 | |
---|
| 53 | #define XMLPortParamGeneric(containername, classname, paramname, loadexecutor, saveexecutor, xmlelement, mode) \ |
---|
| 54 | orxonox::XMLPortClassParamContainer<classname>* containername = (orxonox::XMLPortClassParamContainer<classname>*)(this->getIdentifier()->getXMLPortParamContainer(paramname)); \ |
---|
| 55 | if (!containername) \ |
---|
[853] | 56 | { \ |
---|
[1052] | 57 | containername = new orxonox::XMLPortClassParamContainer<classname>(std::string(paramname), loadexecutor, saveexecutor); \ |
---|
| 58 | this->getIdentifier()->addXMLPortParamContainer(paramname, containername); \ |
---|
[853] | 59 | } \ |
---|
[1052] | 60 | containername->port(this, xmlelement, mode) |
---|
[847] | 61 | |
---|
[1052] | 62 | |
---|
| 63 | #define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \ |
---|
| 64 | XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), #savefunction), xmlelement, mode, bApplyLoaderMask, bLoadBefore) |
---|
| 65 | #define XMLPortObject_Template(classname, objectclass, sectionname, loadtemplate, loadfunction, savetemplate, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \ |
---|
| 66 | XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, orxonox::createExecutor(orxonox::createFunctor loadtemplate (&classname::loadfunction), #loadfunction), orxonox::createExecutor(orxonox::createFunctor savetemplate (&classname::savefunction), #savefunction), xmlelement, mode, bApplyLoaderMask, bLoadBefore) |
---|
| 67 | |
---|
| 68 | #define XMLPortObjectGeneric(containername, classname, objectclass, sectionname, loadexecutor, saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \ |
---|
| 69 | orxonox::XMLPortClassObjectContainer<classname, objectclass>* containername = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(this->getIdentifier()->getXMLPortObjectContainer(sectionname)); \ |
---|
| 70 | if (!containername) \ |
---|
[856] | 71 | { \ |
---|
[1052] | 72 | containername = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(std::string(sectionname), loadexecutor, saveexecutor, bApplyLoaderMask, bLoadBefore); \ |
---|
| 73 | this->getIdentifier()->addXMLPortObjectContainer(sectionname, containername); \ |
---|
[856] | 74 | } \ |
---|
[1052] | 75 | containername->port(this, xmlelement, mode) |
---|
[856] | 76 | |
---|
| 77 | |
---|
[847] | 78 | namespace orxonox |
---|
| 79 | { |
---|
[1052] | 80 | |
---|
| 81 | #ifndef _XMLPort_Mode__ |
---|
| 82 | #define _XMLPort_Mode__ |
---|
| 83 | namespace XMLPort |
---|
| 84 | { |
---|
| 85 | enum Mode |
---|
| 86 | { |
---|
| 87 | LoadObject, |
---|
| 88 | SaveObject |
---|
| 89 | }; |
---|
| 90 | } |
---|
| 91 | #endif |
---|
| 92 | |
---|
[856] | 93 | // ############################### |
---|
| 94 | // ### XMLPortParamContainer ### |
---|
| 95 | // ############################### |
---|
[847] | 96 | class _CoreExport XMLPortParamContainer |
---|
| 97 | { |
---|
[1059] | 98 | public: |
---|
[1052] | 99 | enum ParseResult |
---|
| 100 | { |
---|
| 101 | PR_not_started, |
---|
| 102 | PR_finished, |
---|
| 103 | PR_waiting_for_default_values |
---|
| 104 | }; |
---|
| 105 | |
---|
[847] | 106 | public: |
---|
[1052] | 107 | XMLPortParamContainer() |
---|
| 108 | { this->parseResult_ = PR_not_started; } |
---|
| 109 | virtual ~XMLPortParamContainer() {} |
---|
[847] | 110 | |
---|
| 111 | inline const std::string& getName() const |
---|
| 112 | { return this->paramname_; } |
---|
| 113 | |
---|
[1052] | 114 | virtual XMLPortParamContainer& description(const std::string description) = 0; |
---|
| 115 | virtual const std::string& getDescription() = 0; |
---|
[847] | 116 | |
---|
[1052] | 117 | virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiTypeMath& param) = 0; |
---|
| 118 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1) = 0; |
---|
| 119 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2) = 0; |
---|
| 120 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) = 0; |
---|
| 121 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) = 0; |
---|
| 122 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) = 0; |
---|
[847] | 123 | |
---|
| 124 | protected: |
---|
| 125 | std::string paramname_; |
---|
[1052] | 126 | ParseResult parseResult_; |
---|
[847] | 127 | |
---|
| 128 | }; |
---|
| 129 | |
---|
| 130 | template <class T> |
---|
| 131 | class XMLPortClassParamContainer : public XMLPortParamContainer |
---|
| 132 | { |
---|
[1052] | 133 | struct ParseParams |
---|
| 134 | { |
---|
| 135 | T* object; |
---|
| 136 | Element* xmlelement; |
---|
| 137 | XMLPort::Mode mode; |
---|
| 138 | }; |
---|
| 139 | |
---|
[847] | 140 | public: |
---|
[1052] | 141 | XMLPortClassParamContainer(const std::string paramname, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor) |
---|
[847] | 142 | { |
---|
| 143 | this->paramname_ = paramname; |
---|
[1052] | 144 | this->loadexecutor_ = loadexecutor; |
---|
| 145 | this->saveexecutor_ = saveexecutor; |
---|
[847] | 146 | } |
---|
| 147 | |
---|
[1052] | 148 | XMLPortParamContainer& port(T* object, Element& xmlelement, XMLPort::Mode mode) |
---|
[847] | 149 | { |
---|
[1052] | 150 | this->parseParams_.object = object; |
---|
| 151 | this->parseParams_.xmlelement = &xmlelement; |
---|
| 152 | this->parseParams_.mode = mode; |
---|
| 153 | |
---|
| 154 | if (mode == XMLPort::LoadObject) |
---|
[847] | 155 | { |
---|
[856] | 156 | try |
---|
[850] | 157 | { |
---|
[856] | 158 | std::string attribute = xmlelement.GetAttribute(this->paramname_); |
---|
[1052] | 159 | if ((attribute.size() > 0) || (this->loadexecutor_->allDefaultValuesSet())) |
---|
[850] | 160 | { |
---|
[1057] | 161 | COUT(5) << ((BaseObject*)object)->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << object->getIdentifier()->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")." << std::endl << ((BaseObject*)object)->getLoaderIndentation(); |
---|
[1052] | 162 | if (this->loadexecutor_->parse(object, attribute, ",")) |
---|
| 163 | this->parseResult_ = PR_finished; |
---|
[853] | 164 | else |
---|
[1052] | 165 | this->parseResult_ = PR_waiting_for_default_values; |
---|
[850] | 166 | } |
---|
| 167 | } |
---|
[856] | 168 | catch(ticpp::Exception& ex) |
---|
| 169 | { |
---|
| 170 | COUT(1) << std::endl; |
---|
[1057] | 171 | COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << object->getIdentifier()->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << ((BaseObject*)object)->getLevelfile() << ":" << std::endl; |
---|
[856] | 172 | COUT(1) << ex.what() << std::endl; |
---|
| 173 | } |
---|
[847] | 174 | } |
---|
| 175 | else |
---|
| 176 | { |
---|
[1052] | 177 | if (this->saveexecutor_) |
---|
[853] | 178 | { |
---|
| 179 | // xmlelement.SetAttribute(this->paramname_, "..."); |
---|
| 180 | } |
---|
[847] | 181 | } |
---|
| 182 | |
---|
| 183 | return (*this); |
---|
| 184 | } |
---|
| 185 | |
---|
[1052] | 186 | XMLPortParamContainer& port(const ParseParams& parseParams) |
---|
| 187 | { |
---|
| 188 | return this->port(parseParams.object, *parseParams.xmlelement, parseParams.mode); |
---|
| 189 | } |
---|
| 190 | |
---|
| 191 | XMLPortParamContainer& portIfWaitingForDefaultValues(const ParseResult& result, const ParseParams& params) |
---|
| 192 | { |
---|
| 193 | if (result == PR_waiting_for_default_values) |
---|
| 194 | return this->port(params); |
---|
| 195 | else |
---|
| 196 | return (*this); |
---|
| 197 | } |
---|
| 198 | |
---|
| 199 | virtual XMLPortParamContainer& description(const std::string description) |
---|
| 200 | { this->loadexecutor_->setDescription(description); return (*this); } |
---|
| 201 | virtual const std::string& getDescription() |
---|
| 202 | { return this->loadexecutor_->getDescription(); } |
---|
| 203 | |
---|
| 204 | virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiTypeMath& param) |
---|
| 205 | { |
---|
| 206 | if (!this->loadexecutor_->defaultValueSet(index)) |
---|
| 207 | this->loadexecutor_->setDefaultValue(index, param); |
---|
| 208 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 209 | } |
---|
| 210 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1) |
---|
| 211 | { |
---|
| 212 | if (!this->loadexecutor_->defaultValueSet(0)) |
---|
| 213 | this->loadexecutor_->setDefaultValues(param1); |
---|
| 214 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 215 | } |
---|
| 216 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2) |
---|
| 217 | { |
---|
| 218 | if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1))) |
---|
| 219 | this->loadexecutor_->setDefaultValues(param1, param2); |
---|
| 220 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 221 | } |
---|
| 222 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) |
---|
| 223 | { |
---|
| 224 | if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2))) |
---|
| 225 | this->loadexecutor_->setDefaultValues(param1, param2, param3); |
---|
| 226 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 227 | } |
---|
| 228 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) |
---|
| 229 | { |
---|
| 230 | if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3))) |
---|
| 231 | this->loadexecutor_->setDefaultValues(param1, param2, param3, param4); |
---|
| 232 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 233 | } |
---|
| 234 | virtual XMLPortParamContainer& defaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) |
---|
| 235 | { |
---|
| 236 | if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3)) || (!this->loadexecutor_->defaultValueSet(4))) |
---|
| 237 | this->loadexecutor_->setDefaultValues(param1, param2, param3, param4, param5); |
---|
| 238 | return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_); |
---|
| 239 | } |
---|
| 240 | |
---|
[847] | 241 | private: |
---|
[1052] | 242 | ExecutorMember<T>* loadexecutor_; |
---|
| 243 | ExecutorMember<T>* saveexecutor_; |
---|
| 244 | ParseParams parseParams_; |
---|
[847] | 245 | }; |
---|
[856] | 246 | |
---|
| 247 | |
---|
| 248 | // ################################ |
---|
| 249 | // ### XMLPortObjectContainer ### |
---|
| 250 | // ################################ |
---|
| 251 | class _CoreExport XMLPortObjectContainer |
---|
| 252 | { |
---|
| 253 | public: |
---|
[1052] | 254 | XMLPortObjectContainer() |
---|
| 255 | { this->bApplyLoaderMask_ = false; } |
---|
| 256 | virtual ~XMLPortObjectContainer() {} |
---|
[856] | 257 | |
---|
| 258 | inline const std::string& getName() const |
---|
| 259 | { return this->sectionname_; } |
---|
| 260 | |
---|
[1052] | 261 | virtual XMLPortObjectContainer& description(const std::string description) = 0; |
---|
| 262 | virtual const std::string& getDescription() = 0; |
---|
[856] | 263 | |
---|
[1052] | 264 | bool identifierIsIncludedInLoaderMask(const Identifier* identifier); |
---|
| 265 | |
---|
[856] | 266 | protected: |
---|
| 267 | std::string sectionname_; |
---|
[1052] | 268 | bool bApplyLoaderMask_; |
---|
| 269 | bool bLoadBefore_; |
---|
[856] | 270 | }; |
---|
| 271 | |
---|
| 272 | template <class T, class O> |
---|
| 273 | class XMLPortClassObjectContainer : public XMLPortObjectContainer |
---|
| 274 | { |
---|
| 275 | public: |
---|
[1052] | 276 | XMLPortClassObjectContainer(const std::string sectionname, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor, bool bApplyLoaderMask, bool bLoadBefore) |
---|
[856] | 277 | { |
---|
| 278 | this->sectionname_ = sectionname; |
---|
[1052] | 279 | this->loadexecutor_ = loadexecutor; |
---|
| 280 | this->saveexecutor_ = saveexecutor; |
---|
| 281 | this->bApplyLoaderMask_ = bApplyLoaderMask; |
---|
| 282 | this->bLoadBefore_ = bLoadBefore; |
---|
[856] | 283 | } |
---|
| 284 | |
---|
[1052] | 285 | XMLPortObjectContainer& port(T* object, Element& xmlelement, XMLPort::Mode mode) |
---|
[856] | 286 | { |
---|
[1052] | 287 | if (mode == XMLPort::LoadObject) |
---|
[856] | 288 | { |
---|
| 289 | try |
---|
| 290 | { |
---|
[1052] | 291 | Element* xmlsubelement; |
---|
| 292 | if ((this->sectionname_ != "") && (this->sectionname_.size() > 0)) |
---|
| 293 | xmlsubelement = xmlelement.FirstChildElement(this->sectionname_, false); |
---|
| 294 | else |
---|
| 295 | xmlsubelement = &xmlelement; |
---|
[856] | 296 | |
---|
| 297 | if (xmlsubelement) |
---|
| 298 | { |
---|
[1052] | 299 | for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++) |
---|
[856] | 300 | { |
---|
| 301 | Identifier* identifier = ID(child->Value()); |
---|
| 302 | if (identifier) |
---|
| 303 | { |
---|
| 304 | if (identifier->isA(Class(O))) |
---|
| 305 | { |
---|
[869] | 306 | if (this->identifierIsIncludedInLoaderMask(identifier)) |
---|
[856] | 307 | { |
---|
[1057] | 308 | COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl; |
---|
[1052] | 309 | |
---|
[1057] | 310 | BaseObject* newObject = identifier->fabricate(); |
---|
| 311 | newObject->setLoaderIndentation(((BaseObject*)object)->getLoaderIndentation() + " "); |
---|
| 312 | newObject->setLevel(((BaseObject*)object)->getLevel()); |
---|
| 313 | newObject->setNamespace(((BaseObject*)object)->getNamespace()); |
---|
[1052] | 314 | |
---|
| 315 | if (this->bLoadBefore_) |
---|
| 316 | { |
---|
| 317 | newObject->XMLPort(*child, XMLPort::LoadObject); |
---|
[1057] | 318 | COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << object->getIdentifier()->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl; |
---|
[1052] | 319 | } |
---|
| 320 | else |
---|
| 321 | { |
---|
[1057] | 322 | COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << object->getIdentifier()->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl; |
---|
[1052] | 323 | } |
---|
| 324 | |
---|
[1057] | 325 | COUT(5) << ((BaseObject*)object)->getLoaderIndentation(); |
---|
[1052] | 326 | (*this->loadexecutor_)(object, newObject); |
---|
| 327 | |
---|
| 328 | if (!this->bLoadBefore_) |
---|
| 329 | newObject->XMLPort(*child, XMLPort::LoadObject); |
---|
| 330 | |
---|
[1057] | 331 | COUT(5) << ((BaseObject*)object)->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl; |
---|
[856] | 332 | } |
---|
| 333 | } |
---|
| 334 | else |
---|
| 335 | { |
---|
[1057] | 336 | COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl; |
---|
[856] | 337 | } |
---|
| 338 | } |
---|
| 339 | else |
---|
| 340 | { |
---|
| 341 | COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a valid classname." << std::endl; |
---|
| 342 | } |
---|
| 343 | } |
---|
| 344 | } |
---|
| 345 | } |
---|
| 346 | catch(ticpp::Exception& ex) |
---|
| 347 | { |
---|
| 348 | COUT(1) << std::endl; |
---|
[1057] | 349 | COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << object->getIdentifier()->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getLevelfile() << ":" << std::endl; |
---|
[856] | 350 | COUT(1) << ex.what() << std::endl; |
---|
| 351 | } |
---|
| 352 | } |
---|
| 353 | else |
---|
| 354 | { |
---|
| 355 | } |
---|
| 356 | |
---|
| 357 | return (*this); |
---|
| 358 | } |
---|
| 359 | |
---|
[1052] | 360 | virtual XMLPortObjectContainer& description(const std::string description) |
---|
| 361 | { this->loadexecutor_->setDescription(description); return (*this); } |
---|
| 362 | virtual const std::string& getDescription() |
---|
| 363 | { return this->loadexecutor_->getDescription(); } |
---|
| 364 | |
---|
[856] | 365 | private: |
---|
[1052] | 366 | ExecutorMember<T>* loadexecutor_; |
---|
| 367 | ExecutorMember<T>* saveexecutor_; |
---|
[856] | 368 | }; |
---|
[847] | 369 | } |
---|
| 370 | |
---|
| 371 | #endif /* _XMLPort_H__ */ |
---|