Changeset 2505
- Timestamp:
- Dec 17, 2008, 5:23:02 PM (16 years ago)
- Location:
- code/branches/presentation/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/core/ObjectListIterator.h
r1747 r2505 123 123 { 124 124 if (this->element_) 125 this->element_ = (ObjectListElement<T>*)this->element_->next_;125 this->element_ = static_cast<ObjectListElement<T>*>(this->element_->next_); 126 126 return *this; 127 127 } … … 135 135 ObjectListIterator<T> copy = *this; 136 136 if (this->element_) 137 this->element_ = (ObjectListElement<T>*)this->element_->next_;137 this->element_ = static_cast<ObjectListElement<T>*>(this->element_->next_); 138 138 return copy; 139 139 } … … 146 146 { 147 147 if (this->element_) 148 this->element_ = (ObjectListElement<T>*)this->element_->prev_;148 this->element_ = static_cast<ObjectListElement<T>*>(this->element_->prev_); 149 149 return *this; 150 150 } … … 158 158 ObjectListIterator<T> copy = *this; 159 159 if (this->element_) 160 this->element_ = (ObjectListElement<T>*)this->element_->prev_;160 this->element_ = static_cast<ObjectListElement<T>*>(this->element_->prev_); 161 161 return copy; 162 162 } -
code/branches/presentation/src/core/XMLPort.h
r2485 r2505 93 93 static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##loadexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader")); \ 94 94 static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##saveexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getSaver (variable)), std::string( #classname ) + "::" + #variable + "saver" )); \ 95 XMLPortParamGeneric(xmlcontainer##variable, classname, orxonox::XMLPortVariableHelperClass, &xmlcontainer##variable##dummy, paramname, xmlcontainer##variable##loadexecutor, xmlcontainer##variable##saveexecutor, xmlelement, mode)96 97 /**98 @brief Declares an XML attribute with a name, which will be set through a variable and gotten from a function.99 @param classname The name of the class owning this param100 @param paramname The name of the attribute101 @param variable Name of the variable used to save the value102 @param savefunction A function to get the value of the param from the object (~a get-function)103 @param xmlelement The XMLElement, you get this from the XMLPort function104 @param mode The mode (load or save), you get this from the XMLPort function105 106 In the XML file, a param or attribute will be set like this:107 <classname paramname="value" />108 109 The macro will then store "value" in the variable or read it when saving.110 */111 #define XMLPortParamVariableOnLoad(classname, paramname, variable, savefunction, xmlelement, mode) \112 static XMLPortVariableHelperClass xmlcontainer##variable##dummy((void*)&variable); \113 static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##loadexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(&(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader"))); \114 static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \115 95 XMLPortParamGeneric(xmlcontainer##variable, classname, orxonox::XMLPortVariableHelperClass, &xmlcontainer##variable##dummy, paramname, xmlcontainer##variable##loadexecutor, xmlcontainer##variable##saveexecutor, xmlelement, mode) 116 96
Note: See TracChangeset
for help on using the changeset viewer.