Changeset 7407 for code/trunk/src/modules/objects
- Timestamp:
- Sep 11, 2010, 2:52:59 PM (14 years ago)
- Location:
- code/trunk/src/modules/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/Script.cc
r7406 r7407 73 73 @brief 74 74 Method for creating a Script object through XML. 75 @param xml Element75 @param xmlelement 76 76 The element. 77 77 @param mode 78 78 The mode. 79 79 */ 80 void Script::XMLPort(Element& xml Element, XMLPort::Mode mode)80 void Script::XMLPort(Element& xmlelement, XMLPort::Mode mode) 81 81 { 82 82 SUPER(Script, XMLPort, xmlElement, mode); 83 83 84 XMLPortParam(Script, "code", setCode, getCode, xml Element, mode);85 XMLPortParamTemplate(Script, "mode", setMode, getMode, xml Element, mode, const std::string&).defaultValues(Script::NORMAL);86 XMLPortParam(Script, "onLoad", setOnLoad, isOnLoad, xml Element, mode).defaultValues(true);87 XMLPortParam(Script, "times", setTimes, getTimes, xml Element, mode).defaultValues(Script::INF);88 89 XMLPortEventSink(Script, BaseObject, "trigger", trigger, xml Element, mode);84 XMLPortParam(Script, "code", setCode, getCode, xmlelement, mode); 85 XMLPortParamTemplate(Script, "mode", setMode, getMode, xmlelement, mode, const std::string&).defaultValues(Script::NORMAL); 86 XMLPortParam(Script, "onLoad", setOnLoad, isOnLoad, xmlelement, mode).defaultValues(true); 87 XMLPortParam(Script, "times", setTimes, getTimes, xmlelement, mode).defaultValues(Script::INF); 88 89 XMLPortEventSink(Script, BaseObject, "trigger", trigger, xmlelement, mode); 90 90 91 91 if(this->isOnLoad()) // If the object is onLoad the code is executed at once. … … 96 96 @brief 97 97 Creates a port that can be used to channel events and react to them. 98 @param xml Element98 @param xmlelement 99 99 The element. 100 100 @param mode 101 101 The mode. 102 102 */ 103 void Script::XMLEventPort(Element& xml Element, XMLPort::Mode mode)103 void Script::XMLEventPort(Element& xmlelement, XMLPort::Mode mode) 104 104 { 105 105 SUPER(Script, XMLEventPort, xmlElement, mode); 106 106 107 XMLPortEventState(Script, BaseObject, "trigger", trigger, xml Element, mode);107 XMLPortEventState(Script, BaseObject, "trigger", trigger, xmlelement, mode); 108 108 } 109 109 -
code/trunk/src/modules/objects/Script.h
r7406 r7407 83 83 84 84 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Script object through XML. 85 virtual void XMLEventPort(Element& xml Element, XMLPort::Mode mode); //!< Creates a port that can be used to channel events and react to them.85 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a port that can be used to channel events and react to them. 86 86 87 87 void trigger(bool triggered); //!< Is called when an event comes in trough the event port.
Note: See TracChangeset
for help on using the changeset viewer.