Changeset 9763 in orxonox.OLD for branches/new_class_id/src/lib
- Timestamp:
- Sep 19, 2006, 5:18:04 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util/loading
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/load_param.cc
r9729 r9763 21 21 #include "debug.h" 22 22 /** 23 * Constructs a new LoadParameter23 * @brief Constructs a new LoadParameter 24 24 * @param root the XML-element to load this Parameter from 25 25 * @param paramName the Parameter to load 26 26 * @param object the BaseObject, to load this parameter on to (will be cast to executor's Parameter) 27 * @param executor the Executor, that executes the loading procedure.27 * @param inLoadCycle If we are in a LoadCycle (loading differs.). 28 28 */ 29 29 LoadParamBase::LoadParamBase(const TiXmlElement* root, const std::string& paramName, BaseObject* object, bool inLoadCycle) … … 54 54 55 55 56 56 /** 57 * @brief generates a LoadParam based on 58 * @param root the Root Element to load onto the object. 59 * @param paramName the Parameter name that is loaded. 60 * @param object the Object to apply the changes on. 61 * @param executor the Functional Object, that actually executes the function Call. 62 * @param inLoadCycle If we are inside of a loading cycle. (Loading will be different here) 63 */ 57 64 CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const SubString>* executor, bool inLoadCycle) 58 65 : LoadParamBase(root, paramName, object, inLoadCycle) -
branches/new_class_id/src/lib/util/loading/load_param.h
r9742 r9763 37 37 /** 38 38 * Loads a Parameter from ROOT named PARAMETER_NAME 39 * onto OBJECT of CLASS, trough theFUNCTION39 * onto OBJECT of CLASS, trough FUNCTION 40 40 * @param ROOT the TiXmlElement to load the Parameter from 41 41 * @param PARAMETER_NAME the Name of the Parameter to load … … 47 47 CLoadParam(ROOT, PARAMETER_NAME, OBJECT, createExecutor<CLASS>(&CLASS::FUNCTION), false) 48 48 49 /** 50 * @brief Does essentially the same as LoadParam, but within a Cycle in an ordered fashion. 51 * 52 * This Function looks in each Element, if the PARAMETER_NAME matches, and loads onto OBJECT 53 * of CLASS the ROOT through FUNCTION 54 * 55 * @see LoadParam(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) 56 */ 49 57 #define LoadParam_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \ 50 58 CLoadParam(ROOT, PARAMETER_NAME, OBJECT, createExecutor<CLASS>(&CLASS::FUNCTION), true) … … 77 85 **** REAL DECLARATIONS **** 78 86 **************************/ 79 class LoadParamBase : public BaseObject 87 //!< A BaseClass for all LoadParam's. 88 class LoadParamBase 80 89 { 81 90 protected: … … 86 95 87 96 protected: 88 BaseObject* object; 89 const std::string paramName; 90 bool inLoadCycle; 97 BaseObject* object; //!< The Object to work on 98 const std::string paramName; //!< The Name of the Parameter this LoadParams applies to. 99 bool inLoadCycle; //!< If the Parameter is in a LoadCycle. 91 100 92 101 LoadClassDescription* classDesc; //!< The LoadClassDescription of this CLoadParameter … … 96 105 97 106 98 //! abstract Base class for a Loadable parameter107 //! The Loading Class of the LoadParam, that acctually executes the loading process. 99 108 class CLoadParam : public LoadParamBase 100 109 { … … 111 120 112 121 private: 113 Executor<const SubString>* executor; 122 Executor<const SubString>* executor; //!< The Executor, that actually executes the Loading process. 114 123 }; 115 124 -
branches/new_class_id/src/lib/util/loading/load_param_xml.cc
r9727 r9763 19 19 #include "load_param_description.h" 20 20 21 22 /** 23 * @brief generates a LoadParam based on 24 * @param root the Root Element to load onto the object. 25 * @param paramName the Parameter name that is loaded. 26 * @param object the Object to apply the changes on. 27 * @param executor the Functional Object, that actually executes the function Call. 28 * @param inLoadCycle If we are inside of a loading cycle. (Loading will be different here) 29 */ 21 30 XmlLoadParam::XmlLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const TiXmlElement*>* executor, bool inLoadCycle ) 22 31 : LoadParamBase(root, paramName, object, inLoadCycle) -
branches/new_class_id/src/lib/util/loading/load_param_xml.h
r9727 r9763 25 25 #include "executor/executor_xml.h" 26 26 27 /** 28 * @brief Loads a Parameter from ROOT named PARAMETER_NAME 29 * onto OBJECT of CLASS, trough FUNCTION 30 * @param ROOT the TiXmlElement to load the Parameter from 31 * @param PARAMETER_NAME the Name of the Parameter to load 32 * @param OBJECT The BaseObject to load the new setting to. 33 * @param CLASS What Class the BaseObejct is of (this is for identifying the Functuon) 34 * @param FUNCTION The function of Class to Load (if you want to call &CLASS::FUNCTION write FUNCTION here). 35 */ 27 36 #define LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \ 28 37 XmlLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), false) 29 38 39 40 /** 41 * @brief Does essentially the same as LoadParamXML, but within a Cycle in an ordered fashion. 42 * 43 * This Function looks in each Element, if the PARAMETER_NAME matches, and loads onto OBJECT 44 * of CLASS the ROOT through FUNCTION 45 * 46 * @see LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) 47 */ 30 48 #define LoadParamXML_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \ 31 49 XmlLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), true) 32 50 51 //! A Class that can load XML tags onto an Object. 33 52 class XmlLoadParam : public LoadParamBase 34 53 { … … 37 56 virtual ~XmlLoadParam(); 38 57 58 /** @param descriptionText the description @returns self @brief describes the Loading parameter. */ 39 59 XmlLoadParam& describe(const std::string& descriptionText) { LoadParamBase::describe(descriptionText); return *this; }; 40 60 41 61 private: 42 Executor<const TiXmlElement*>* executor; 62 Executor<const TiXmlElement*>* executor; //!< The Executor, that does the actual loading process. 43 63 }; 44 64
Note: See TracChangeset
for help on using the changeset viewer.