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 |
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);