eXperiment robotics framework

Saving and loading data is acomplished by calling the save() or the load() of Plugins derived from Serializable.

Saving data back to disk:

This part should be implemented in the save(XE * xe_out) function member. If no argument is provided then the save is just an update of the Xml Element, if a xe_out argument is provided then the Xml data is saved to that pointer.

Loading previously saved data:

This part should be implemented in the load(const XE * xe_in) function member. If no argument is provided then the load is just an update of the class variables from the Xml element, if a xe_in argument is provided then the Xml data is loaded from that pointer.

Checking for the presence of xe_in or xe_out

Optional: to check if there is any argument and if that argument is usable the CHECK_XE_ARG macro is provided, it creates a xe_tmp variable that can be used in the rest of the code.
void TestSerializationPlugin::save(XE * xe_arg) {
    CHECK_XE_ARG;
    *xe_tmp << *vec3;
    *xe_tmp << *quaternion;
    *xe_tmp << *texture;
    *xe_tmp << *color3;
    *xe_tmp << *color4;
    *xe_tmp << *tags;
    *xe_tmp << *frame;
    *xe_tmp << *object3D;
    *xe_tmp << *zone;
    *xe_tmp << MZones;
}

The miarn project - written by Joao Xavier