| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
XMLLoadSave Class Reference#include <XMLLoadSave.h>
Inheritance diagram for XMLLoadSave: ![]() Detailed DescriptionXMLLoadSave adds functions for XML format serialization, although if you write binary LoadSave functions as well, you can do either.
Definition at line 20 of file XMLLoadSave.h.
Member Function Documentation
resets the parse tree currently in memory so that a future save will write a "fresh" copy from scratch. You may also want to call this in order to save memory after a Load so that the parse tree information isn't retained in memory if you don't care about retaining the file formatting Definition at line 266 of file XMLLoadSave.cc. Referenced by operator=(), and ~XMLLoadSave().
Calculates space needed to save - if you can't precisely add up the size, just make sure to overestimate and things will still work. getBinSize is used for reserving buffers during serialization, but does not necessarily determine the actual size of what is written -- the return value of saveBuffer() specifies that after the data actually has been written. If getBinSize overestimates, the extra memory allocation is only temporary, no extra filler bytes are actually stored.
Implements LoadSave. Reimplemented in EventBase, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, and VisionObjectEvent. Definition at line 64 of file XMLLoadSave.cc. Referenced by EventBase::getBinSize().
Load from a saved buffer in memory.
Implements LoadSave. Reimplemented in EventBase, and Config. Definition at line 82 of file XMLLoadSave.cc. Referenced by plist::loadBuffer(), EventBase::loadBuffer(), and Config::loadBuffer().
initiate opening of the specified file and loading/saving of all appropriate information.
Reimplemented from LoadSave. Reimplemented in EventBase, and Config. Definition at line 148 of file XMLLoadSave.cc. Referenced by plist::loadFile(), EventBase::loadFile(), Config::loadFile(), and ConfigurationEditor::LoadSettings::selectedFile().
Used recursively on member objects once a file is already open - DON'T CLOSE the file in your overridden functions.
Reimplemented from LoadSave. Reimplemented in EventBase, and Config. Definition at line 214 of file XMLLoadSave.cc. Referenced by EventBase::loadFileStream(), and Config::loadFileStream().
This is called when the subclass needs to update its values from those values in the parse tree. node is the current node in the tree -- it may be the root, but it may also be a subnode within the tree if a recursive structure is used Implemented in EventBase, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, VisionObjectEvent, plist::PolymorphicLoader, plist::ObjectBase, plist::ObjectBase, plist::Dictionary, plist::ArrayBase, plist::Primitive< char >, plist::Primitive< unsigned char >, plist::Primitive< std::string >, plist::NamedEnumeration< T >, plist::NamedEnumeration< J_DCT_METHOD >, plist::NamedEnumeration< Config::transports >, plist::NamedEnumeration< gain_levels >, plist::NamedEnumeration< volume_levels >, plist::NamedEnumeration< encoding_t >, plist::NamedEnumeration< compression_t >, plist::NamedEnumeration< white_balance_levels >, plist::NamedEnumeration< consoleMode_t >, and plist::NamedEnumeration< shutter_speeds >. Referenced by loadBuffer(), loadFile(), loadFileStream(), and readParseTree().
Save to a given buffer in memory.
Implements LoadSave. Reimplemented in EventBase. Definition at line 124 of file XMLLoadSave.cc. Referenced by EventBase::saveBuffer().
initiate opening of the specified file and loading/saving of all appropriate information.
Reimplemented from LoadSave. Reimplemented in EventBase. Definition at line 193 of file XMLLoadSave.cc. Referenced by EventBase::saveFile(), and ConfigurationEditor::SaveSettings::selectedFile().
Used recursively on member objects once a file is already open - DON'T CLOSE the file in your overridden functions.
Reimplemented from LoadSave. Reimplemented in EventBase. Definition at line 248 of file XMLLoadSave.cc. Referenced by EventBase::saveFileStream().
This is called when XMLLoadSave needs to have the subclass update values in the tree currently in memory -- may already be filled out by previous contents. node is the current node in the tree -- it may be the root, but it may also be a subnode within the tree if a recursive structure is used Implemented in EventBase, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, VisionObjectEvent, plist::PolymorphicLoader, plist::ObjectBase, plist::Dictionary, plist::ArrayBase, plist::Primitive< char >, plist::Primitive< unsigned char >, plist::Primitive< std::string >, plist::NamedEnumeration< T >, plist::NamedEnumeration< J_DCT_METHOD >, plist::NamedEnumeration< Config::transports >, plist::NamedEnumeration< gain_levels >, plist::NamedEnumeration< volume_levels >, plist::NamedEnumeration< encoding_t >, plist::NamedEnumeration< compression_t >, plist::NamedEnumeration< white_balance_levels >, plist::NamedEnumeration< consoleMode_t >, and plist::NamedEnumeration< shutter_speeds >. Referenced by getBinSize(), saveBuffer(), saveFile(), saveFileStream(), and writeParseTree().
assigns a parse tree which you have obtained from some other source This doesn't update the contents of the subclass's values. The values in doc will be overwritten by those in the subclass on the next Save. If you wish to have the subclass's values updated from doc, call readParseTree() after calling this. Reimplemented in plist::ObjectBase. Definition at line 270 of file XMLLoadSave.cc. Referenced by getBinSize(), operator=(), saveBuffer(), saveFile(), saveFileStream(), plist::ObjectBase::setParseTree(), and writeParseTree(). returns the next element following cur; comment is set to the concatination of any comments is encountered in the interim You should call this with node->next, otherwise you'll just keep getting the same node back again Definition at line 332 of file XMLLoadSave.cc. returns the next element following cur You should call this with node->next, otherwise you'll just keep getting the same node back again Definition at line 326 of file XMLLoadSave.cc. Referenced by VisionObjectEvent::loadXML(), TimerEvent::loadXML(), TextMsgEvent::loadXML(), plist::ArrayBase::loadXML(), plist::Dictionary::loadXML(), PitchEvent::loadXML(), LookoutIREvent::loadXML(), LookoutPointAtEvent::loadXML(), LocomotionEvent::loadXML(), plist::Dictionary::saveOverXMLNode(), VisionObjectEvent::saveXML(), TimerEvent::saveXML(), TextMsgEvent::saveXML(), plist::ArrayBase::saveXML(), plist::Dictionary::saveXML(), PitchEvent::saveXML(), LookoutIREvent::saveXML(), LookoutPointAtEvent::saveXML(), and LocomotionEvent::saveXML().
The documentation for this class was generated from the following files: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Fri May 11 20:09:04 2007 by Doxygen 1.4.7 |