D:/orxonox/orxonox-0.0.3/src/core/XMLPort.h

This is the same as XMLPortParam, but for attributes in an extern class.
Parameters:
classname The name of the class owning the object owning the attribute
externclass The name of the extern class (the objects class)
object The name of the object of the extern class (a member of the main class)
paramname The name of the attribute
loadfunction The function to set the attribute inside of the member object.
loadfunction The function to get the attribute from the member object
Sometimes you'll have a member object in your class, which has it's own load- and savefunctions. With this macro, you can simply use them instead of writing your own functions.

Your class is called SpaceShip and this class has an object (myPilot_) of class Pilot. Pilot has a name and two functions, setName(name) and getName(). Now you want an attribute "pilotname" in your SpaceShip class. Instead of writing wrapper functions, you can simply use the XMLPortParamExtern macro: > XMLPortParamExtern(SpaceShip, Pilot, myPilot_, "pilotname", setName, getName, xmlelement, mode);


Generated on Tue Jul 28 16:20:47 2009 for Orxonox by  doxygen 1.5.6