Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
XMLLoadSave Class ReferenceXMLLoadSave adds functions for XML format serialization, although if you write binary LoadSave functions as well, you can do either. More...
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.
Constructor & Destructor Documentation
constructor Definition at line 179 of file XMLLoadSave.cc.
copy constructor Definition at line 183 of file XMLLoadSave.cc.
destructor Definition at line 198 of file XMLLoadSave.cc. 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 695 of file XMLLoadSave.cc. Referenced by operator=(), and ~XMLLoadSave().
called by libxml2 when it's done reading data Definition at line 756 of file XMLLoadSave.cc. Referenced by loadFileStream().
called by libxml2 when it's ready for more data to be read from the source (in this case, a file) Definition at line 753 of file XMLLoadSave.cc. Referenced by loadFileStream(). returns the root element of the xml document Reimplemented in plist::ObjectBase. Definition at line 741 of file XMLLoadSave.cc. Referenced by getBinSize(), loadBuffer(), loadFile(), loadFileStream(), loadStream(), readParseTree(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), and writeParseTree().
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 DataEvent< T, TID >, EventBase, KoduEventBase, KoduGiveEvent, KoduSayEvent, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, VisionObjectEvent, and DataEvent< T >. Definition at line 220 of file XMLLoadSave.cc.
returns the current compression level setting used by libxml2 (via zlib) Definition at line 100 of file XMLLoadSave.h.
returns the current parse tree, either from a previous Load, Save, or setParseTree() Definition at line 87 of file XMLLoadSave.h.
Load from a saved buffer in memory.
Implements LoadSave. Reimplemented in EventBase, and Config. Definition at line 240 of file XMLLoadSave.cc.
initiate opening of the specified file and loading/saving of all appropriate information.
Reimplemented from LoadSave. Reimplemented in EventBase, KoduConfig, and Config. Definition at line 340 of file XMLLoadSave.cc. Referenced by GaitedFootstepMC::GaitedFootstepMC(), Kinematics::init(), CameraData::loadCameraData(), LoadWalkControl::selectedFile(), ConfigurationEditor::LoadSettings::selectedFile(), GaitedFootstepMC::setGait(), and XWalkMC::XWalkMC().
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 451 of file XMLLoadSave.cc.
loads from a std::istream, optionally cleaning up stream to allow additional loads if asFragment is true Definition at line 600 of file XMLLoadSave.cc.
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 DataEvent< T, TID >, EventBase, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, VisionObjectEvent, KinematicJoint, RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, EllipsoidObstacle, InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >, plist::ObjectBase, plist::ObjectBase, plist::DictionaryBase, plist::ArrayBase, plist::Primitive< T >, plist::NamedEnumeration< T >, plist::OutputSelector, plist::Angle, plist::Point, plist::RGBColor< T >, DataEvent< T >, plist::Primitive< fmat::fmatReal >, plist::Primitive< PLISTREAL >, plist::Primitive< std::string >, plist::Primitive< float >, plist::Primitive< int >, plist::Primitive< unsigned int >, plist::Primitive< unsigned short >, plist::Primitive< string >, plist::Primitive< storage_t >, plist::Primitive< bool >, plist::NamedEnumeration< Config::vision_config::encoding_t >, plist::NamedEnumeration< J_DCT_METHOD >, plist::NamedEnumeration< Config::transports >, plist::NamedEnumeration< gain_levels >, plist::NamedEnumeration< volume_levels >, plist::NamedEnumeration< compression_t >, plist::NamedEnumeration< white_balance_levels >, plist::NamedEnumeration< consoleMode_t >, plist::NamedEnumeration< JointType_t >, and plist::NamedEnumeration< shutter_speeds >. Referenced by loadBuffer(), loadFile(), loadFileStream(), loadStream(), and readParseTree().
assignment operator Definition at line 187 of file XMLLoadSave.cc.
calls loadXML with the root of the current parse tree Definition at line 710 of file XMLLoadSave.cc. Referenced by GaitedFootsteps::setGait().
cleans up after an error occurs and sends a message to cerr Definition at line 202 of file XMLLoadSave.cc. Referenced by getBinSize(), loadBuffer(), loadFile(), loadFileStream(), loadStream(), readParseTree(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), and writeParseTree().
Save to a given buffer in memory.
Implements LoadSave. Reimplemented in EventBase. Definition at line 284 of file XMLLoadSave.cc.
initiate opening of the specified file and loading/saving of all appropriate information.
Reimplemented from LoadSave. Reimplemented in EventBase. Definition at line 387 of file XMLLoadSave.cc. Referenced by CameraData::saveCameraData(), ConfigurationEditor::SaveSettings::selectedFile(), and SaveWalkControl::takeInput().
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 487 of file XMLLoadSave.cc.
Writes into a std::ostream, does not flush. Reimplemented from LoadSave. Definition at line 71 of file XMLLoadSave.h. Referenced by saveStream().
saves to a std::ostream, optionally skipping xml document header if asFragment is true Definition at line 650 of file XMLLoadSave.cc.
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 DataEvent< T, TID >, EventBase, LocomotionEvent, LookoutPointAtEvent, LookoutIREvent, PitchEvent, TextMsgEvent, TimerEvent, VisionObjectEvent, KinematicJointSaver, RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, EllipsoidObstacle, plist::ObjectBase, plist::DictionaryBase, plist::ArrayBase, plist::Primitive< T >, plist::NamedEnumeration< T >, plist::OutputSelector, plist::Angle, plist::Point, plist::RGBColor< T >, DataEvent< T >, plist::Primitive< fmat::fmatReal >, plist::Primitive< PLISTREAL >, plist::Primitive< std::string >, plist::Primitive< float >, plist::Primitive< int >, plist::Primitive< unsigned int >, plist::Primitive< unsigned short >, plist::Primitive< string >, plist::Primitive< storage_t >, plist::Primitive< bool >, plist::NamedEnumeration< Config::vision_config::encoding_t >, plist::NamedEnumeration< J_DCT_METHOD >, plist::NamedEnumeration< Config::transports >, plist::NamedEnumeration< gain_levels >, plist::NamedEnumeration< volume_levels >, plist::NamedEnumeration< compression_t >, plist::NamedEnumeration< white_balance_levels >, plist::NamedEnumeration< consoleMode_t >, plist::NamedEnumeration< JointType_t >, and plist::NamedEnumeration< shutter_speeds >. Referenced by getBinSize(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), and writeParseTree().
allows you to set the compression level used by libxml2 -- this corresponds to the compression level setting of zlib, i.e. 0-9 Definition at line 735 of file XMLLoadSave.cc.
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 699 of file XMLLoadSave.cc. Referenced by getBinSize(), operator=(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), 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 766 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 760 of file XMLLoadSave.cc. Referenced by VisionObjectEvent::loadXML(), TimerEvent::loadXML(), TextMsgEvent::loadXML(), plist::ArrayBase::loadXML(), plist::DictionaryBase::loadXML(), PitchEvent::loadXML(), LookoutIREvent::loadXML(), LookoutPointAtEvent::loadXML(), LocomotionEvent::loadXML(), DataEvent< T, TID >::loadXML(), KinematicJointLoader::loadXMLNode(), plist::DictionaryBase::saveOverXMLNode(), VisionObjectEvent::saveXML(), TimerEvent::saveXML(), TextMsgEvent::saveXML(), plist::ArrayBase::saveXML(), plist::DictionaryBase::saveXML(), PitchEvent::saveXML(), LookoutIREvent::saveXML(), LookoutPointAtEvent::saveXML(), LocomotionEvent::saveXML(), and DataEvent< T, TID >::saveXML(). sets the object's parse tree to NULL and returns the former tree, which is then caller's responisibility Definition at line 705 of file XMLLoadSave.cc. Referenced by GaitedFootsteps::setGait().
calls saveXML with the root of the current parse tree Definition at line 722 of file XMLLoadSave.cc. Member Data Documentation
if true, the saved document will use automatic indenting and formatting Definition at line 129 of file XMLLoadSave.h. Referenced by plist::Collection::Collection(), getBinSize(), operator=(), saveBuffer(), saveFile(), saveFileStream(), and saveStream().
the current compression level, or level to be used for the next save Definition at line 126 of file XMLLoadSave.h. Referenced by getBinSize(), getCompression(), operator=(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), setCompression(), and writeParseTree().
allows automatic (de)initialization of libxml when the first or last XMLLoadSave class is created or destroyed allows tracking of libxml usage so the library can be initialized and destructed automatically
the cached xml parse tree -- contains additional formatting information such as white space and comments Definition at line 123 of file XMLLoadSave.h. Referenced by clearParseTree(), getBinSize(), getParseTree(), loadBuffer(), loadFile(), loadFileStream(), loadStream(), operator=(), readParseTree(), saveBuffer(), saveFile(), saveFileStream(), saveStream(), setCompression(), setParseTree(), plist::ObjectBase::setParseTree(), stealParseTree(), and writeParseTree(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:19 2016 by Doxygen 1.6.3 |