Vault  4.1
Public Member Functions | Friends
VBentoNode Class Reference

VBentoNode represents an object in the data hierarchy; objects can have named/typed attributes attached to them, as well as contained (child) objects. More...

#include <vbento.h>

List of all members.

Public Member Functions

virtual ~VBentoNode ()
 Destructor, deletes the object and all of its attribute objects and contained child objects.
 VBentoNode ()
 Constructs an uninitialized object.
 VBentoNode (const VString &name)
 Constructs a named object.
 VBentoNode (const VBentoNode &original)
void addChildNode (VBentoNode *node)
 Adds a child to the object.
VBentoNodeaddNewChildNode (const VString &name)
 Adds a new child to the object.
void addInt (const VString &name, int value)
 Adds the specified attribute to the node.
void addBool (const VString &name, bool value)
 Adds the specified attribute to the node.
void addString (const VString &name, const VString &value, const VString &encoding=VString::EMPTY())
 Adds the specified attribute to the node.
void addStringIfNotEmpty (const VString &name, const VString &value, const VString &encoding=VString::EMPTY())
 Adds the specified string to the node if its length is non-zero.
void addChar (const VString &name, const VCodePoint &value)
 Adds the specified attribute to the node.
void addDouble (const VString &name, VDouble value)
 Adds the specified attribute to the node.
void addDuration (const VString &name, const VDuration &value)
 Adds the specified attribute to the node.
void addInstant (const VString &name, const VInstant &value)
 Adds the specified attribute to the node.
void addSize (const VString &name, const VSize &value)
 Adds the specified attribute to the node.
void addISize (const VString &name, const VISize &value)
 Adds the specified attribute to the node.
void addPoint (const VString &name, const VPoint &value)
 Adds the specified attribute to the node.
void addIPoint (const VString &name, const VIPoint &value)
 Adds the specified attribute to the node.
void addPoint3D (const VString &name, const VPoint3D &value)
 Adds the specified attribute to the node.
void addIPoint3D (const VString &name, const VIPoint3D &value)
 Adds the specified attribute to the node.
void addLine (const VString &name, const VLine &value)
 Adds the specified attribute to the node.
void addILine (const VString &name, const VILine &value)
 Adds the specified attribute to the node.
void addRect (const VString &name, const VRect &value)
 Adds the specified attribute to the node.
void addIRect (const VString &name, const VIRect &value)
 Adds the specified attribute to the node.
void addPolygon (const VString &name, const VPolygon &value)
 Adds the specified attribute to the node.
void addIPolygon (const VString &name, const VIPolygon &value)
 Adds the specified attribute to the node.
void addColor (const VString &name, const VColor &value)
 Adds the specified attribute to the node.
void addS8 (const VString &name, Vs8 value)
 Adds the specified attribute to the node.
void addU8 (const VString &name, Vu8 value)
 Adds the specified attribute to the node.
void addS16 (const VString &name, Vs16 value)
 Adds the specified attribute to the node.
void addU16 (const VString &name, Vu16 value)
 Adds the specified attribute to the node.
void addS32 (const VString &name, Vs32 value)
 Adds the specified attribute to the node.
void addU32 (const VString &name, Vu32 value)
 Adds the specified attribute to the node.
void addS64 (const VString &name, Vs64 value)
 Adds the specified attribute to the node.
void addU64 (const VString &name, Vu64 value)
 Adds the specified attribute to the node.
void addFloat (const VString &name, VFloat value)
 Adds the specified attribute to the node.
void addBinary (const VString &name, const Vu8 *data, Vs64 length)
 Adds the specified attribute to the node by copying the supplied data.
void addBinary (const VString &name, Vu8 *data, VMemoryStream::BufferAllocationType allocationType, bool adoptBuffer, Vs64 suppliedBufferSize, Vs64 suppliedEOFOffset)
 Adds the specified attribute to the node, using VMemoryStream::adoptBuffer() semantics.
VBentoS8ArrayaddS8Array (const VString &name)
 Adds the specified attribute to the node.
VBentoS8ArrayaddS8Array (const VString &name, const Vs8Array &value)
 Adds the specified attribute with array data to the node.
VBentoS16ArrayaddS16Array (const VString &name)
 Adds the specified attribute to the node.
VBentoS16ArrayaddS16Array (const VString &name, const Vs16Array &value)
 Adds the specified attribute with array data to the node.
VBentoS32ArrayaddS32Array (const VString &name)
 Adds the specified attribute to the node.
VBentoS32ArrayaddS32Array (const VString &name, const Vs32Array &value)
 Adds the specified attribute with array data to the node.
VBentoS64ArrayaddS64Array (const VString &name)
 Adds the specified attribute to the node.
VBentoS64ArrayaddS64Array (const VString &name, const Vs64Array &value)
 Adds the specified attribute with array data to the node.
VBentoStringArrayaddStringArray (const VString &name)
 Adds the specified attribute to the node.
VBentoStringArrayaddStringArray (const VString &name, const VStringVector &value)
 Adds the specified attribute with array data to the node.
VBentoBoolArrayaddBoolArray (const VString &name)
 Adds the specified attribute to the node.
VBentoBoolArrayaddBoolArray (const VString &name, const VBoolArray &value)
 Adds the specified attribute with array data to the node.
VBentoDoubleArrayaddDoubleArray (const VString &name)
 Adds the specified attribute to the node.
VBentoDoubleArrayaddDoubleArray (const VString &name, const VDoubleArray &value)
 Adds the specified attribute with array data to the node.
VBentoDurationArrayaddDurationArray (const VString &name)
 Adds the specified attribute to the node.
VBentoDurationArrayaddDurationArray (const VString &name, const VDurationVector &value)
 Adds the specified attribute with array data to the node.
VBentoInstantArrayaddInstantArray (const VString &name)
 Adds the specified attribute to the node.
VBentoInstantArrayaddInstantArray (const VString &name, const VInstantVector &value)
 Adds the specified attribute with array data to the node.
void writeToStream (VBinaryIOStream &stream) const
 Writes the object, including its attributes and contained child objects, to a binary data stream.
void writeToBentoTextStream (VTextIOStream &stream, bool lineWrap=false, int indentDepth=0) const
 Writes the object, including its attributes and contained child objects, to a text stream in Bento Text Format.
void writeToBentoTextString (VString &s, bool lineWrap=false) const
 Writes the object, including its attributes and contained child objects, to a text stream in Bento Text Format.
 VBentoNode (VBinaryIOStream &stream)
 Constructs an object by reading it (including its attributes and contained child objects) from a Bento binary data stream.
 VBentoNode (VTextIOStream &bentoTextStream)
 Constructs an object by reading it (including its attributes and contained child objects) from a Bento Text stream.
void readFromStream (VBinaryIOStream &stream)
 Reads the object (including its attributes and contained child objects) from a Bento binary data stream.
void readFromBentoTextStream (VTextIOStream &bentoTextStream)
 Reads the object (including its attributes and contained child objects) from a Bento Text stream.
void readFromBentoTextString (const VString &bentoTextString)
 Reads the object (including its attributes and contained child objects) from a Bento Text string.
VBentoNodegetParentNode () const
 Returns a pointer to the parent node.
const VBentoNodePtrVector & getNodes () const
 Returns the vector of contained child objects attached to this object.
const VBentoNodefindNode (const VString &nodeName) const
 Returns a contained child object, searched by name, that is attached to this object.
const VBentoNodefindNode (const VString &nodeName, const VString &attributeName, const VString &dataType) const
 Returns a contained child object, searched by name+attribute+dataType, that is attached to this object.
int getInt (const VString &name, int defaultValue) const
 Returns the value of the specified attribute, or the supplied default value if no such attribute exists.
int getInt (const VString &name) const
 Returns the value of the specified attribute, or throws an exception if no such attribute exists.
bool getBool (const VString &name, bool defaultValue) const
 Returns the value of the specified attribute, or the supplied default value if no such attribute exists.
bool getBool (const VString &name) const
 Returns the value of the specified attribute, or throws an exception if no such attribute exists.
const VStringgetString (const VString &name, const VString &defaultValue) const
 Returns the value of the specified string attribute, or the supplied default value if no such string attribute exists.
const VStringgetString (const VString &name) const
 Returns the value of the specified string attribute, or throws an exception if no such string attribute exists.
const VCodePointgetChar (const VString &name, const VCodePoint &defaultValue) const
 Returns the value of the specified char attribute, or the supplied default value if no such attribute exists.
const VCodePointgetChar (const VString &name) const
 Returns the value of the specified char attribute, or throws an exception if no such string attribute exists.
VDouble getDouble (const VString &name, VDouble defaultValue) const
 Returns the value of the specified attribute, or the supplied default value if no such attribute exists.
VDouble getDouble (const VString &name) const
 Returns the value of the specified attribute, or throws an exception if no such attribute exists.
const VDurationgetDuration (const VString &name, const VDuration &defaultValue) const
 Returns the value of the specified attribute, or the supplied default value if no such attribute exists.
const VDurationgetDuration (const VString &name) const
 Returns the value of the specified attribute, or throws an exception if no such attribute exists.
const VInstantgetInstant (const VString &name, const VInstant &defaultValue) const
 Returns the value of the specified attribute, or the supplied default value if no such attribute exists.
const VInstantgetInstant (const VString &name) const
 Returns the value of the specified attribute, or throws an exception if no such attribute exists.
const VSizegetSize (const VString &name, const VSize &defaultValue) const
const VSizegetSize (const VString &name) const
const VISizegetISize (const VString &name, const VISize &defaultValue) const
const VISizegetISize (const VString &name) const
const VPointgetPoint (const VString &name, const VPoint &defaultValue) const
const VPointgetPoint (const VString &name) const
const VIPointgetIPoint (const VString &name, const VIPoint &defaultValue) const
const VIPointgetIPoint (const VString &name) const
const VPoint3DgetPoint3D (const VString &name, const VPoint3D &defaultValue) const
const VPoint3DgetPoint3D (const VString &name) const
const VIPoint3DgetIPoint3D (const VString &name, const VIPoint3D &defaultValue) const
const VIPoint3DgetIPoint3D (const VString &name) const
const VLinegetLine (const VString &name, const VLine &defaultValue) const
const VLinegetLine (const VString &name) const
const VILinegetILine (const VString &name, const VILine &defaultValue) const
const VILinegetILine (const VString &name) const
const VRectgetRect (const VString &name, const VRect &defaultValue) const
const VRectgetRect (const VString &name) const
const VIRectgetIRect (const VString &name, const VIRect &defaultValue) const
const VIRectgetIRect (const VString &name) const
const VPolygongetPolygon (const VString &name, const VPolygon &defaultValue) const
const VPolygongetPolygon (const VString &name) const
const VIPolygongetIPolygon (const VString &name, const VIPolygon &defaultValue) const
const VIPolygongetIPolygon (const VString &name) const
const VColorgetColor (const VString &name, const VColor &defaultValue) const
const VColorgetColor (const VString &name) const
Vs8 getS8 (const VString &name, Vs8 defaultValue) const
 Returns the value of the specified Vs8 attribute, or the supplied default value if no such Vs8 attribute exists.
Vs8 getS8 (const VString &name) const
 Returns the value of the specified Vs8 attribute, or throws an exception if no such Vs8 attribute exists.
Vu8 getU8 (const VString &name, Vu8 defaultValue) const
 Returns the value of the specified Vu8 attribute, or the supplied default value if no such Vu8 attribute exists.
Vu8 getU8 (const VString &name) const
 Returns the value of the specified Vu8 attribute, or throws an exception if no such Vu8 attribute exists.
Vs16 getS16 (const VString &name, Vs16 defaultValue) const
 Returns the value of the specified Vs16 attribute, or the supplied default value if no such Vs16 attribute exists.
Vs16 getS16 (const VString &name) const
 Returns the value of the specified Vs16 attribute, or throws an exception if no such Vs16 attribute exists.
Vu16 getU16 (const VString &name, Vu16 defaultValue) const
 Returns the value of the specified Vu16 attribute, or the supplied default value if no such Vu16 attribute exists.
Vu16 getU16 (const VString &name) const
 Returns the value of the specified Vu16 attribute, or throws an exception if no such Vu16 attribute exists.
Vs32 getS32 (const VString &name, Vs32 defaultValue) const
 Returns the value of the specified Vs32 attribute, or the supplied default value if no such Vs32 attribute exists.
Vs32 getS32 (const VString &name) const
 Returns the value of the specified Vs32 attribute, or throws an exception if no such Vs32 attribute exists.
Vu32 getU32 (const VString &name, Vu32 defaultValue) const
 Returns the value of the specified Vu32 attribute, or the supplied default value if no such Vu32 attribute exists.
Vu32 getU32 (const VString &name) const
 Returns the value of the specified Vu32 attribute, or throws an exception if no such Vu32 attribute exists.
Vs64 getS64 (const VString &name, Vs64 defaultValue) const
 Returns the value of the specified Vs64 attribute, or the supplied default value if no such Vs64 attribute exists.
Vs64 getS64 (const VString &name) const
 Returns the value of the specified Vs64 attribute, or throws an exception if no such Vs64 attribute exists.
Vu64 getU64 (const VString &name, Vu64 defaultValue) const
 Returns the value of the specified Vu64 attribute, or the supplied default value if no such Vu64 attribute exists.
Vu64 getU64 (const VString &name) const
 Returns the value of the specified Vu64 attribute, or throws an exception if no such Vu64 attribute exists.
VFloat getFloat (const VString &name, VFloat defaultValue) const
 Returns the value of the specified VFloat attribute, or the supplied default value if no such VFloat attribute exists.
VFloat getFloat (const VString &name) const
 Returns the value of the specified VFloat attribute, or throws an exception if no such VFloat attribute exists.
bool getBinary (const VString &name, VReadOnlyMemoryStream &returnedReader) const
 Returns true and sets returnedReader if the specified binary data attribute exists, or returns false and does not touch returendReader if no such binary data attribute exists.
VReadOnlyMemoryStream getBinary (const VString &name) const
 Returns a reader on the specified binary data attribute, or throws an exception if no such binary data attribute exists.
const Vs8Array & getS8Array (const VString &name, const Vs8Array &defaultValue) const
 Returns the value of the specified Vs8 array attribute, or the supplied default value if no such Vs8 attribute exists.
const Vs8Array & getS8Array (const VString &name) const
 Returns the value of the specified Vs8 array attribute, or throws an exception if no such Vs8 attribute exists.
const Vs16Array & getS16Array (const VString &name, const Vs16Array &defaultValue) const
 Returns the value of the specified Vs16 array attribute, or the supplied default value if no such Vs16 attribute exists.
const Vs16Array & getS16Array (const VString &name) const
 Returns the value of the specified Vs16 array attribute, or throws an exception if no such Vs16 attribute exists.
const Vs32Array & getS32Array (const VString &name, const Vs32Array &defaultValue) const
 Returns the value of the specified Vs32 array attribute, or the supplied default value if no such Vs32 attribute exists.
const Vs32Array & getS32Array (const VString &name) const
 Returns the value of the specified Vs32 array attribute, or throws an exception if no such Vs32 attribute exists.
const Vs64Array & getS64Array (const VString &name, const Vs64Array &defaultValue) const
 Returns the value of the specified Vs64 array attribute, or the supplied default value if no such Vs64 attribute exists.
const Vs64Array & getS64Array (const VString &name) const
 Returns the value of the specified Vs64 array attribute, or throws an exception if no such Vs64 attribute exists.
const VStringVectorgetStringArray (const VString &name, const VStringVector &defaultValue) const
 Returns the value of the specified VString array attribute, or the supplied default value if no such VString attribute exists.
const VStringVectorgetStringArray (const VString &name) const
 Returns the value of the specified VString array attribute, or throws an exception if no such VString attribute exists.
const VBoolArray & getBoolArray (const VString &name, const VBoolArray &defaultValue) const
 Returns the value of the specified VBool array attribute, or the supplied default value if no such VBool attribute exists.
const VBoolArray & getBoolArray (const VString &name) const
 Returns the value of the specified VBool array attribute, or throws an exception if no such VBool attribute exists.
const VDoubleArray & getDoubleArray (const VString &name, const VDoubleArray &defaultValue) const
 Returns the value of the specified VDouble array attribute, or the supplied default value if no such VDouble attribute exists.
const VDoubleArray & getDoubleArray (const VString &name) const
 Returns the value of the specified VDouble array attribute, or throws an exception if no such VDouble attribute exists.
const VDurationVectorgetDurationArray (const VString &name, const VDurationVector &defaultValue) const
 Returns the value of the specified VDuration array attribute, or the supplied default value if no such VDuration attribute exists.
const VDurationVectorgetDurationArray (const VString &name) const
 Returns the value of the specified VDuration array attribute, or throws an exception if no such VDuration attribute exists.
const VInstantVectorgetInstantArray (const VString &name, const VInstantVector &defaultValue) const
 Returns the value of the specified VInstant array attribute, or the supplied default value if no such VInstant attribute exists.
const VInstantVectorgetInstantArray (const VString &name) const
 Returns the value of the specified VInstant array attribute, or throws an exception if no such VInstant attribute exists.
void setInt (const VString &name, int value)
 Updates or adds the specified attribute of the node.
void setBool (const VString &name, bool value)
 Updates or adds the specified attribute of the node.
void setString (const VString &name, const VString &value, const VString &encoding=VString::EMPTY())
 Updates or adds the specified attribute of the node.
void setChar (const VString &name, const VCodePoint &value)
 Updates or adds the specified attribute of the node.
void setDouble (const VString &name, VDouble value)
 Updates or adds the specified attribute of the node.
void setDuration (const VString &name, const VDuration &value)
 Updates or adds the specified attribute of the node.
void setInstant (const VString &name, const VInstant &value)
 Updates or adds the specified attribute of the node.
void setSize (const VString &name, const VSize &value)
 Updates or adds the specified attribute of the node.
void setISize (const VString &name, const VISize &value)
 Updates or adds the specified attribute of the node.
void setPoint (const VString &name, const VPoint &value)
 Updates or adds the specified attribute of the node.
void setIPoint (const VString &name, const VIPoint &value)
 Updates or adds the specified attribute of the node.
void setPoint3D (const VString &name, const VPoint3D &value)
 Updates or adds the specified attribute of the node.
void setIPoint3D (const VString &name, const VIPoint3D &value)
 Updates or adds the specified attribute of the node.
void setLine (const VString &name, const VLine &value)
 Updates or adds the specified attribute of the node.
void setILine (const VString &name, const VILine &value)
 Updates or adds the specified attribute of the node.
void setRect (const VString &name, const VRect &value)
 Updates or adds the specified attribute of the node.
void setIRect (const VString &name, const VIRect &value)
 Updates or adds the specified attribute of the node.
void setPolygon (const VString &name, const VPolygon &value)
 Updates or adds the specified attribute of the node.
void setIPolygon (const VString &name, const VIPolygon &value)
 Updates or adds the specified attribute of the node.
void setColor (const VString &name, const VColor &value)
 Updates or adds the specified attribute of the node.
void setS64 (const VString &name, Vs64 value)
 Updates or adds the specified attribute of the node.
const VBentoAttributePtrVector & getAttributes () const
 Returns the vector of attribute objects attached to this object.
const VBentoAttributefindAttribute (const VString &name, const VString &dataType) const
const VStringgetName () const
 Returns the node's name.
void setName (const VString &name)
 Sets the node's name.
void writeToXMLTextStream (VTextIOStream &stream, bool lineWrap=false, int indentDepth=0) const
 Writes the object, including its attributes and contained child objects, to an XML text stream.
void printXML () const
 Prints the node's XML text rendering to stdout for debugging purposes.
void printHexDump (VHex &hexDump) const
 Prints the node's binary stream layout to stdout for debugging purposes.
void clear ()
 Deletes all attributes and children (recursive) from this node.
void orphanAttributes ()
 Removes all attribute references from this node.
void orphanNodes ()
 Removes all child node references from this node.
void orphanNode (const VBentoNode *node)
 Removes a particular child node reference from this node.
void adoptFrom (VBentoNode *node)
 Adopts the entire set of attributes and children from the specified node.
void updateFrom (const VBentoNode &node)
 Updates this bento node with the attributes and children from the specified node, using the following rules:

Friends

class VBentoAttribute
class VBentoCallbackParser
class VBentoString
class VBentoBinary
class VBentoUnit
class VBentoTextNodeParser
class VBentoStringArray
bool operator< (const VBentoNode &lhs, const VBentoNode &rhs)
 Compares nodes using their name strings.
bool operator<= (const VBentoNode &lhs, const VBentoNode &rhs)
 Compares nodes using their name strings.
bool operator>= (const VBentoNode &lhs, const VBentoNode &rhs)
 Compares nodes using their name strings.
bool operator> (const VBentoNode &lhs, const VBentoNode &rhs)
 Compares nodes using their name strings.

Detailed Description

VBentoNode represents an object in the data hierarchy; objects can have named/typed attributes attached to them, as well as contained (child) objects.

Definition at line 207 of file vbento.h.


Constructor & Destructor Documentation

VBentoNode::VBentoNode ( const VString name)

Constructs a named object.

Parameters:
namethe name to assign to the object

Definition at line 1415 of file vbento.cpp.

VBentoNode::VBentoNode ( VBinaryIOStream stream)

Constructs an object by reading it (including its attributes and contained child objects) from a Bento binary data stream.

Parameters:
streamthe stream to read from

Definition at line 1423 of file vbento.cpp.

References readFromStream().

VBentoNode::VBentoNode ( VTextIOStream bentoTextStream)

Constructs an object by reading it (including its attributes and contained child objects) from a Bento Text stream.

Parameters:
bentoTextStreamthe stream to read from

Definition at line 1432 of file vbento.cpp.

References readFromBentoTextStream().


Member Function Documentation

void VBentoNode::addChildNode ( VBentoNode node)

Adds a child to the object.

This object will delete the child object when this object is destructed.

Parameters:
nodethe child object node to add

Definition at line 1563 of file vbento.cpp.

VBentoNode * VBentoNode::addNewChildNode ( const VString name)

Adds a new child to the object.

This object will delete the child object when this object is destructed.

Parameters:
namethe name of the child node to create and add
Returns:
the newly created and added child

Definition at line 1568 of file vbento.cpp.

References VBentoNode().

void VBentoNode::addInt ( const VString name,
int  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1575 of file vbento.cpp.

References addS32().

void VBentoNode::addBool ( const VString name,
bool  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1576 of file vbento.cpp.

void VBentoNode::addString ( const VString name,
const VString value,
const VString encoding = VString::EMPTY() 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value
encodingthe text encoding of the value string (UTF-8 assumed if not specified)

Definition at line 1577 of file vbento.cpp.

void VBentoNode::addStringIfNotEmpty ( const VString name,
const VString value,
const VString encoding = VString::EMPTY() 
)

Adds the specified string to the node if its length is non-zero.

Parameters:
namethe attribute name
valuethe attribute value
encodingthe text encoding of the value string (UTF-8 assumed if not specified)

Definition at line 1578 of file vbento.cpp.

References VString::isEmpty().

void VBentoNode::addChar ( const VString name,
const VCodePoint value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1579 of file vbento.cpp.

void VBentoNode::addDouble ( const VString name,
VDouble  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1580 of file vbento.cpp.

void VBentoNode::addDuration ( const VString name,
const VDuration value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1581 of file vbento.cpp.

void VBentoNode::addInstant ( const VString name,
const VInstant value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1582 of file vbento.cpp.

void VBentoNode::addSize ( const VString name,
const VSize value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1583 of file vbento.cpp.

void VBentoNode::addISize ( const VString name,
const VISize value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1584 of file vbento.cpp.

void VBentoNode::addPoint ( const VString name,
const VPoint value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1585 of file vbento.cpp.

void VBentoNode::addIPoint ( const VString name,
const VIPoint value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1586 of file vbento.cpp.

void VBentoNode::addPoint3D ( const VString name,
const VPoint3D value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1587 of file vbento.cpp.

void VBentoNode::addIPoint3D ( const VString name,
const VIPoint3D value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1588 of file vbento.cpp.

void VBentoNode::addLine ( const VString name,
const VLine value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1589 of file vbento.cpp.

void VBentoNode::addILine ( const VString name,
const VILine value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1590 of file vbento.cpp.

void VBentoNode::addRect ( const VString name,
const VRect value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1591 of file vbento.cpp.

void VBentoNode::addIRect ( const VString name,
const VIRect value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1592 of file vbento.cpp.

void VBentoNode::addPolygon ( const VString name,
const VPolygon value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1593 of file vbento.cpp.

void VBentoNode::addIPolygon ( const VString name,
const VIPolygon value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1594 of file vbento.cpp.

void VBentoNode::addColor ( const VString name,
const VColor value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1595 of file vbento.cpp.

void VBentoNode::addS8 ( const VString name,
Vs8  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1596 of file vbento.cpp.

void VBentoNode::addU8 ( const VString name,
Vu8  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1597 of file vbento.cpp.

void VBentoNode::addS16 ( const VString name,
Vs16  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1598 of file vbento.cpp.

void VBentoNode::addU16 ( const VString name,
Vu16  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1599 of file vbento.cpp.

void VBentoNode::addS32 ( const VString name,
Vs32  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1600 of file vbento.cpp.

void VBentoNode::addU32 ( const VString name,
Vu32  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1601 of file vbento.cpp.

void VBentoNode::addS64 ( const VString name,
Vs64  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1602 of file vbento.cpp.

void VBentoNode::addU64 ( const VString name,
Vu64  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1603 of file vbento.cpp.

void VBentoNode::addFloat ( const VString name,
VFloat  value 
)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 1604 of file vbento.cpp.

void VBentoNode::addBinary ( const VString name,
const Vu8 data,
Vs64  length 
)

Adds the specified attribute to the node by copying the supplied data.

Parameters:
namethe attribute name
datathe data buffer to add
lengththe length of data to add

Definition at line 1605 of file vbento.cpp.

void VBentoNode::addBinary ( const VString name,
Vu8 data,
VMemoryStream::BufferAllocationType  allocationType,
bool  adoptBuffer,
Vs64  suppliedBufferSize,
Vs64  suppliedEOFOffset 
)

Adds the specified attribute to the node, using VMemoryStream::adoptBuffer() semantics.

Parameters:
namethe attribute name
datathe buffer to use
allocationTypethe way the buffer was allocated (needed if being adopted)
adoptBuffertrue if the node is to adopt the buffer (and thus be responsible for deleting it on destruction)
suppliedBufferSizethe size of the buffer
suppliedEOFOffsetthe EOF offset in the buffer

Definition at line 1606 of file vbento.cpp.

VBentoS8Array * VBentoNode::addS8Array ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1607 of file vbento.cpp.

VBentoS8Array * VBentoNode::addS8Array ( const VString name,
const Vs8Array &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1608 of file vbento.cpp.

VBentoS16Array * VBentoNode::addS16Array ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1609 of file vbento.cpp.

VBentoS16Array * VBentoNode::addS16Array ( const VString name,
const Vs16Array &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1610 of file vbento.cpp.

VBentoS32Array * VBentoNode::addS32Array ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1611 of file vbento.cpp.

VBentoS32Array * VBentoNode::addS32Array ( const VString name,
const Vs32Array &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1612 of file vbento.cpp.

VBentoS64Array * VBentoNode::addS64Array ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1613 of file vbento.cpp.

VBentoS64Array * VBentoNode::addS64Array ( const VString name,
const Vs64Array &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1614 of file vbento.cpp.

VBentoStringArray * VBentoNode::addStringArray ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1615 of file vbento.cpp.

VBentoStringArray * VBentoNode::addStringArray ( const VString name,
const VStringVector value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1616 of file vbento.cpp.

VBentoBoolArray * VBentoNode::addBoolArray ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1617 of file vbento.cpp.

VBentoBoolArray * VBentoNode::addBoolArray ( const VString name,
const VBoolArray &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1618 of file vbento.cpp.

VBentoDoubleArray * VBentoNode::addDoubleArray ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1619 of file vbento.cpp.

VBentoDoubleArray * VBentoNode::addDoubleArray ( const VString name,
const VDoubleArray &  value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1620 of file vbento.cpp.

VBentoDurationArray * VBentoNode::addDurationArray ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1621 of file vbento.cpp.

VBentoDurationArray * VBentoNode::addDurationArray ( const VString name,
const VDurationVector value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1622 of file vbento.cpp.

VBentoInstantArray * VBentoNode::addInstantArray ( const VString name)

Adds the specified attribute to the node.

Parameters:
namethe attribute name
Returns:
the newly added attribute

Definition at line 1623 of file vbento.cpp.

VBentoInstantArray * VBentoNode::addInstantArray ( const VString name,
const VInstantVector value 
)

Adds the specified attribute with array data to the node.

Parameters:
namethe attribute name
valuethe attribute value
Returns:
the newly added attribute

Definition at line 1624 of file vbento.cpp.

void VBentoNode::writeToStream ( VBinaryIOStream stream) const

Writes the object, including its attributes and contained child objects, to a binary data stream.

Parameters:
streamthe stream to write to

Definition at line 1626 of file vbento.cpp.

References VBinaryIOStream::writeSize32(), and VBinaryIOStream::writeString().

void VBentoNode::writeToBentoTextStream ( VTextIOStream stream,
bool  lineWrap = false,
int  indentDepth = 0 
) const

Writes the object, including its attributes and contained child objects, to a text stream in Bento Text Format.

Parameters:
streamthe stream to write to
lineWraptrue if each bento node should start on its own indented line
indentDepthif lineWrap is true, the indent level depth of this node

Definition at line 1647 of file vbento.cpp.

References VString::chars(), and VTextIOStream::writeString().

void VBentoNode::writeToBentoTextString ( VString s,
bool  lineWrap = false 
) const

Writes the object, including its attributes and contained child objects, to a text stream in Bento Text Format.

Use some caution in calling this vs. writeToBentoTextStream, since the entire hierarchy must be collected into a single string here.

Parameters:
sthe string to write to
lineWraptrue if each bento node should start on its own indented line

Definition at line 1675 of file vbento.cpp.

References VString::EMPTY(), VTextIOStream::readAll(), VIOStream::seek0(), VTextIOStream::writeLineEnd(), and writeToBentoTextStream().

void VBentoNode::readFromStream ( VBinaryIOStream stream)

Reads the object (including its attributes and contained child objects) from a Bento binary data stream.

This is an alternative to simply constructing the object with the stream as a constructor parameter. If you call this on a node that has already read some data from a stream (not the normal mode of use), this will update the node name and append further attributes and child nodes per the stream data.

Parameters:
streamthe stream to read from

Definition at line 1686 of file vbento.cpp.

References addChildNode(), VBentoAttribute::newObjectFromStream(), VBinaryIOStream::readS32(), VBinaryIOStream::readString(), and VBentoNode().

void VBentoNode::readFromBentoTextStream ( VTextIOStream bentoTextStream)

Reads the object (including its attributes and contained child objects) from a Bento Text stream.

This is an alternative to simply constructing the object with the stream as a constructor parameter. If you call this on a node that has already read some data from a stream (not the normal mode of use), this will update the node name and append further attributes and child nodes per the stream data.

Parameters:
bentoTextStreamthe stream to read from

Definition at line 1702 of file vbento.cpp.

void VBentoNode::readFromBentoTextString ( const VString bentoTextString)

Reads the object (including its attributes and contained child objects) from a Bento Text string.

This is an alternative to simply constructing the object with the string as a constructor parameter. If you call this on a node that has already read some data from a stream (not the normal mode of use), this will update the node name and append further attributes and child nodes per the stream data.

Parameters:
bentoTextStringthe string to read from

Definition at line 1707 of file vbento.cpp.

VBentoNode * VBentoNode::getParentNode ( ) const

Returns a pointer to the parent node.

To change a node's parent, you must operate on the parent, telling it to addChildNode() or orphanNode(). You cannot directly modify the parent pointer.

Returns:
a pointer to the parent node

Definition at line 1712 of file vbento.cpp.

const VBentoNodePtrVector & VBentoNode::getNodes ( ) const

Returns the vector of contained child objects attached to this object.

Returns:
the objects vector, which is a vector of pointers

Definition at line 1716 of file vbento.cpp.

const VBentoNode * VBentoNode::findNode ( const VString nodeName) const

Returns a contained child object, searched by name, that is attached to this object.

This method does NOT search recursively.

Parameters:
nodeNamethe object name to match
Returns:
a pointer to the found child object, or NULL if not found

Definition at line 1720 of file vbento.cpp.

References VString::equalsIgnoreCase(), and NULL.

const VBentoNode * VBentoNode::findNode ( const VString nodeName,
const VString attributeName,
const VString dataType 
) const

Returns a contained child object, searched by name+attribute+dataType, that is attached to this object.

This method does NOT search recursively.

Parameters:
nodeNamethe object name to match
attributeNamethe attribute name to match; object must have an attribute with this name whose data type also matches
dataTypethe attribute data type to match; object must have an attribute with this data type whose name also matches
Returns:
a pointer to the found child object, or NULL if not found

Definition at line 1730 of file vbento.cpp.

References VString::equalsIgnoreCase(), and NULL.

int VBentoNode::getInt ( const VString name,
int  defaultValue 
) const

Returns the value of the specified attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1742 of file vbento.cpp.

References getS32().

int VBentoNode::getInt ( const VString name) const

Returns the value of the specified attribute, or throws an exception if no such attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1746 of file vbento.cpp.

References getS32().

bool VBentoNode::getBool ( const VString name,
bool  defaultValue 
) const

Returns the value of the specified attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1750 of file vbento.cpp.

References VBentoBool::DATA_TYPE_ID(), VBentoBool::getValue(), and NULL.

bool VBentoNode::getBool ( const VString name) const

Returns the value of the specified attribute, or throws an exception if no such attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1755 of file vbento.cpp.

References VBentoBool::DATA_TYPE_ID(), VBentoBool::getValue(), and NULL.

const VString & VBentoNode::getString ( const VString name,
const VString defaultValue 
) const

Returns the value of the specified string attribute, or the supplied default value if no such string attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1764 of file vbento.cpp.

References VBentoString::DATA_TYPE_ID(), VBentoString::getValue(), and NULL.

const VString & VBentoNode::getString ( const VString name) const

Returns the value of the specified string attribute, or throws an exception if no such string attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1769 of file vbento.cpp.

References VBentoString::DATA_TYPE_ID(), VBentoString::getValue(), and NULL.

const VCodePoint & VBentoNode::getChar ( const VString name,
const VCodePoint defaultValue 
) const

Returns the value of the specified char attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1778 of file vbento.cpp.

References VBentoChar::DATA_TYPE_ID(), VBentoChar::getValue(), and NULL.

const VCodePoint & VBentoNode::getChar ( const VString name) const

Returns the value of the specified char attribute, or throws an exception if no such string attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1783 of file vbento.cpp.

References VBentoChar::DATA_TYPE_ID(), VBentoChar::getValue(), and NULL.

VDouble VBentoNode::getDouble ( const VString name,
VDouble  defaultValue 
) const

Returns the value of the specified attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1792 of file vbento.cpp.

References VBentoDouble::DATA_TYPE_ID(), VBentoDouble::getValue(), and NULL.

VDouble VBentoNode::getDouble ( const VString name) const

Returns the value of the specified attribute, or throws an exception if no such attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1797 of file vbento.cpp.

References VBentoDouble::DATA_TYPE_ID(), VBentoDouble::getValue(), and NULL.

const VDuration & VBentoNode::getDuration ( const VString name,
const VDuration defaultValue 
) const

Returns the value of the specified attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1806 of file vbento.cpp.

References VBentoDuration::DATA_TYPE_ID(), VBentoDuration::getValue(), and NULL.

const VDuration & VBentoNode::getDuration ( const VString name) const

Returns the value of the specified attribute, or throws an exception if no such attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1811 of file vbento.cpp.

References VBentoDuration::DATA_TYPE_ID(), VBentoDuration::getValue(), and NULL.

const VInstant & VBentoNode::getInstant ( const VString name,
const VInstant defaultValue 
) const

Returns the value of the specified attribute, or the supplied default value if no such attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 1820 of file vbento.cpp.

References VBentoInstant::DATA_TYPE_ID(), VBentoInstant::getValue(), and NULL.

const VInstant & VBentoNode::getInstant ( const VString name) const

Returns the value of the specified attribute, or throws an exception if no such attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 1825 of file vbento.cpp.

References VBentoInstant::DATA_TYPE_ID(), VBentoInstant::getValue(), and NULL.

Vs8 VBentoNode::getS8 ( const VString name,
Vs8  defaultValue 
) const

Returns the value of the specified Vs8 attribute, or the supplied default value if no such Vs8 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2016 of file vbento.cpp.

References VBentoS8::DATA_TYPE_ID(), VBentoS8::getValue(), and NULL.

Vs8 VBentoNode::getS8 ( const VString name) const

Returns the value of the specified Vs8 attribute, or throws an exception if no such Vs8 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2021 of file vbento.cpp.

References VBentoS8::DATA_TYPE_ID(), VBentoS8::getValue(), and NULL.

Vu8 VBentoNode::getU8 ( const VString name,
Vu8  defaultValue 
) const

Returns the value of the specified Vu8 attribute, or the supplied default value if no such Vu8 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2030 of file vbento.cpp.

References VBentoU8::DATA_TYPE_ID(), VBentoU8::getValue(), and NULL.

Vu8 VBentoNode::getU8 ( const VString name) const

Returns the value of the specified Vu8 attribute, or throws an exception if no such Vu8 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2035 of file vbento.cpp.

References VBentoU8::DATA_TYPE_ID(), VBentoU8::getValue(), and NULL.

Vs16 VBentoNode::getS16 ( const VString name,
Vs16  defaultValue 
) const

Returns the value of the specified Vs16 attribute, or the supplied default value if no such Vs16 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2044 of file vbento.cpp.

References VBentoS16::DATA_TYPE_ID(), VBentoS16::getValue(), and NULL.

Vs16 VBentoNode::getS16 ( const VString name) const

Returns the value of the specified Vs16 attribute, or throws an exception if no such Vs16 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2049 of file vbento.cpp.

References VBentoS16::DATA_TYPE_ID(), VBentoS16::getValue(), and NULL.

Vu16 VBentoNode::getU16 ( const VString name,
Vu16  defaultValue 
) const

Returns the value of the specified Vu16 attribute, or the supplied default value if no such Vu16 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2058 of file vbento.cpp.

References VBentoU16::DATA_TYPE_ID(), VBentoU16::getValue(), and NULL.

Vu16 VBentoNode::getU16 ( const VString name) const

Returns the value of the specified Vu16 attribute, or throws an exception if no such Vu16 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2063 of file vbento.cpp.

References VBentoU16::DATA_TYPE_ID(), VBentoU16::getValue(), and NULL.

Vs32 VBentoNode::getS32 ( const VString name,
Vs32  defaultValue 
) const

Returns the value of the specified Vs32 attribute, or the supplied default value if no such Vs32 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2072 of file vbento.cpp.

References VBentoS32::DATA_TYPE_ID(), VBentoS32::getValue(), and NULL.

Vs32 VBentoNode::getS32 ( const VString name) const

Returns the value of the specified Vs32 attribute, or throws an exception if no such Vs32 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2077 of file vbento.cpp.

References VBentoS32::DATA_TYPE_ID(), VBentoS32::getValue(), and NULL.

Vu32 VBentoNode::getU32 ( const VString name,
Vu32  defaultValue 
) const

Returns the value of the specified Vu32 attribute, or the supplied default value if no such Vu32 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2086 of file vbento.cpp.

References VBentoU32::DATA_TYPE_ID(), VBentoU32::getValue(), and NULL.

Vu32 VBentoNode::getU32 ( const VString name) const

Returns the value of the specified Vu32 attribute, or throws an exception if no such Vu32 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2091 of file vbento.cpp.

References VBentoU32::DATA_TYPE_ID(), VBentoU32::getValue(), and NULL.

Vs64 VBentoNode::getS64 ( const VString name,
Vs64  defaultValue 
) const

Returns the value of the specified Vs64 attribute, or the supplied default value if no such Vs64 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2100 of file vbento.cpp.

References VBentoS64::DATA_TYPE_ID(), VBentoS64::getValue(), and NULL.

Vs64 VBentoNode::getS64 ( const VString name) const

Returns the value of the specified Vs64 attribute, or throws an exception if no such Vs64 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2105 of file vbento.cpp.

References VBentoS64::DATA_TYPE_ID(), VBentoS64::getValue(), and NULL.

Vu64 VBentoNode::getU64 ( const VString name,
Vu64  defaultValue 
) const

Returns the value of the specified Vu64 attribute, or the supplied default value if no such Vu64 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2114 of file vbento.cpp.

References VBentoU64::DATA_TYPE_ID(), VBentoU64::getValue(), and NULL.

Vu64 VBentoNode::getU64 ( const VString name) const

Returns the value of the specified Vu64 attribute, or throws an exception if no such Vu64 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2119 of file vbento.cpp.

References VBentoU64::DATA_TYPE_ID(), VBentoU64::getValue(), and NULL.

VFloat VBentoNode::getFloat ( const VString name,
VFloat  defaultValue 
) const

Returns the value of the specified VFloat attribute, or the supplied default value if no such VFloat attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2128 of file vbento.cpp.

References VBentoFloat::DATA_TYPE_ID(), VBentoFloat::getValue(), and NULL.

VFloat VBentoNode::getFloat ( const VString name) const

Returns the value of the specified VFloat attribute, or throws an exception if no such VFloat attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2133 of file vbento.cpp.

References VBentoFloat::DATA_TYPE_ID(), VBentoFloat::getValue(), and NULL.

bool VBentoNode::getBinary ( const VString name,
VReadOnlyMemoryStream returnedReader 
) const

Returns true and sets returnedReader if the specified binary data attribute exists, or returns false and does not touch returendReader if no such binary data attribute exists.

Parameters:
namethe attribute name
returnedReadera read-only memory stream that will be set to read on the attribute's binary data if it exists

Definition at line 2142 of file vbento.cpp.

References VBentoBinary::DATA_TYPE_ID(), VBentoBinary::getReader(), and NULL.

VReadOnlyMemoryStream VBentoNode::getBinary ( const VString name) const

Returns a reader on the specified binary data attribute, or throws an exception if no such binary data attribute exists.

Parameters:
namethe attribute name
Returns:
a reader on the found attribute's buffer

Definition at line 2152 of file vbento.cpp.

References VBentoBinary::DATA_TYPE_ID(), VBentoBinary::getReader(), and NULL.

const Vs8Array & VBentoNode::getS8Array ( const VString name,
const Vs8Array &  defaultValue 
) const

Returns the value of the specified Vs8 array attribute, or the supplied default value if no such Vs8 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2161 of file vbento.cpp.

References VBentoS8Array::DATA_TYPE_ID(), VBentoS8Array::getValue(), and NULL.

const Vs8Array & VBentoNode::getS8Array ( const VString name) const

Returns the value of the specified Vs8 array attribute, or throws an exception if no such Vs8 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2166 of file vbento.cpp.

References VBentoS8Array::DATA_TYPE_ID(), VBentoS8Array::getValue(), and NULL.

const Vs16Array & VBentoNode::getS16Array ( const VString name,
const Vs16Array &  defaultValue 
) const

Returns the value of the specified Vs16 array attribute, or the supplied default value if no such Vs16 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2175 of file vbento.cpp.

References VBentoS16Array::DATA_TYPE_ID(), VBentoS16Array::getValue(), and NULL.

const Vs16Array & VBentoNode::getS16Array ( const VString name) const

Returns the value of the specified Vs16 array attribute, or throws an exception if no such Vs16 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2180 of file vbento.cpp.

References VBentoS16Array::DATA_TYPE_ID(), VBentoS16Array::getValue(), and NULL.

const Vs32Array & VBentoNode::getS32Array ( const VString name,
const Vs32Array &  defaultValue 
) const

Returns the value of the specified Vs32 array attribute, or the supplied default value if no such Vs32 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2189 of file vbento.cpp.

References VBentoS32Array::DATA_TYPE_ID(), VBentoS32Array::getValue(), and NULL.

const Vs32Array & VBentoNode::getS32Array ( const VString name) const

Returns the value of the specified Vs32 array attribute, or throws an exception if no such Vs32 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2194 of file vbento.cpp.

References VBentoS32Array::DATA_TYPE_ID(), VBentoS32Array::getValue(), and NULL.

const Vs64Array & VBentoNode::getS64Array ( const VString name,
const Vs64Array &  defaultValue 
) const

Returns the value of the specified Vs64 array attribute, or the supplied default value if no such Vs64 attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2203 of file vbento.cpp.

References VBentoS64Array::DATA_TYPE_ID(), VBentoS64Array::getValue(), and NULL.

const Vs64Array & VBentoNode::getS64Array ( const VString name) const

Returns the value of the specified Vs64 array attribute, or throws an exception if no such Vs64 attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2208 of file vbento.cpp.

References VBentoS64Array::DATA_TYPE_ID(), VBentoS64Array::getValue(), and NULL.

const VStringVector & VBentoNode::getStringArray ( const VString name,
const VStringVector defaultValue 
) const

Returns the value of the specified VString array attribute, or the supplied default value if no such VString attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2217 of file vbento.cpp.

References VBentoStringArray::DATA_TYPE_ID(), VBentoStringArray::getValue(), and NULL.

const VStringVector & VBentoNode::getStringArray ( const VString name) const

Returns the value of the specified VString array attribute, or throws an exception if no such VString attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2226 of file vbento.cpp.

References VBentoStringArray::DATA_TYPE_ID(), VBentoStringArray::getValue(), and NULL.

const VBoolArray & VBentoNode::getBoolArray ( const VString name,
const VBoolArray &  defaultValue 
) const

Returns the value of the specified VBool array attribute, or the supplied default value if no such VBool attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2235 of file vbento.cpp.

References VBentoBoolArray::DATA_TYPE_ID(), VBentoBoolArray::getValue(), and NULL.

const VBoolArray & VBentoNode::getBoolArray ( const VString name) const

Returns the value of the specified VBool array attribute, or throws an exception if no such VBool attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2240 of file vbento.cpp.

References VBentoBoolArray::DATA_TYPE_ID(), VBentoBoolArray::getValue(), and NULL.

const VDoubleArray & VBentoNode::getDoubleArray ( const VString name,
const VDoubleArray &  defaultValue 
) const

Returns the value of the specified VDouble array attribute, or the supplied default value if no such VDouble attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2249 of file vbento.cpp.

References VBentoDoubleArray::DATA_TYPE_ID(), VBentoDoubleArray::getValue(), and NULL.

const VDoubleArray & VBentoNode::getDoubleArray ( const VString name) const

Returns the value of the specified VDouble array attribute, or throws an exception if no such VDouble attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2254 of file vbento.cpp.

References VBentoDoubleArray::DATA_TYPE_ID(), VBentoDoubleArray::getValue(), and NULL.

const VDurationVector & VBentoNode::getDurationArray ( const VString name,
const VDurationVector defaultValue 
) const

Returns the value of the specified VDuration array attribute, or the supplied default value if no such VDuration attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2263 of file vbento.cpp.

References VBentoDurationArray::DATA_TYPE_ID(), VBentoDurationArray::getValue(), and NULL.

const VDurationVector & VBentoNode::getDurationArray ( const VString name) const

Returns the value of the specified VDuration array attribute, or throws an exception if no such VDuration attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2268 of file vbento.cpp.

References VBentoDurationArray::DATA_TYPE_ID(), VBentoDurationArray::getValue(), and NULL.

const VInstantVector & VBentoNode::getInstantArray ( const VString name,
const VInstantVector defaultValue 
) const

Returns the value of the specified VInstant array attribute, or the supplied default value if no such VInstant attribute exists.

Parameters:
namethe attribute name
defaultValuethe default value to return
Returns:
the found attribute's value, or the supplied default

Definition at line 2277 of file vbento.cpp.

References VBentoInstantArray::DATA_TYPE_ID(), VBentoInstantArray::getValue(), and NULL.

const VInstantVector & VBentoNode::getInstantArray ( const VString name) const

Returns the value of the specified VInstant array attribute, or throws an exception if no such VInstant attribute exists.

Parameters:
namethe attribute name
Returns:
the found attribute's value

Definition at line 2282 of file vbento.cpp.

References VBentoInstantArray::DATA_TYPE_ID(), VBentoInstantArray::getValue(), and NULL.

void VBentoNode::setInt ( const VString name,
int  value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2291 of file vbento.cpp.

References addInt(), VBentoS32::DATA_TYPE_ID(), NULL, and VBentoS32::setValue().

void VBentoNode::setBool ( const VString name,
bool  value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2299 of file vbento.cpp.

References addBool(), VBentoBool::DATA_TYPE_ID(), NULL, and VBentoBool::setValue().

void VBentoNode::setString ( const VString name,
const VString value,
const VString encoding = VString::EMPTY() 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value
encodingthe text encoding of the value string (UTF-8 assumed if not specified)

Definition at line 2307 of file vbento.cpp.

References addString(), VBentoString::DATA_TYPE_ID(), NULL, VBentoString::setEncoding(), and VBentoString::setValue().

void VBentoNode::setChar ( const VString name,
const VCodePoint value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2317 of file vbento.cpp.

References addChar(), VBentoChar::DATA_TYPE_ID(), NULL, and VBentoChar::setValue().

void VBentoNode::setDouble ( const VString name,
VDouble  value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2325 of file vbento.cpp.

References addDouble(), VBentoDouble::DATA_TYPE_ID(), NULL, and VBentoDouble::setValue().

void VBentoNode::setDuration ( const VString name,
const VDuration value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2333 of file vbento.cpp.

References addDuration(), VBentoDuration::DATA_TYPE_ID(), NULL, and VBentoDuration::setValue().

void VBentoNode::setInstant ( const VString name,
const VInstant value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2341 of file vbento.cpp.

References addInstant(), VBentoInstant::DATA_TYPE_ID(), NULL, and VBentoInstant::setValue().

void VBentoNode::setSize ( const VString name,
const VSize value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2349 of file vbento.cpp.

References addSize(), VBentoSize::DATA_TYPE_ID(), NULL, and VBentoSize::setValue().

void VBentoNode::setISize ( const VString name,
const VISize value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2357 of file vbento.cpp.

References addISize(), VBentoISize::DATA_TYPE_ID(), NULL, and VBentoISize::setValue().

void VBentoNode::setPoint ( const VString name,
const VPoint value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2365 of file vbento.cpp.

References addPoint(), VBentoPoint::DATA_TYPE_ID(), NULL, and VBentoPoint::setValue().

void VBentoNode::setIPoint ( const VString name,
const VIPoint value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2373 of file vbento.cpp.

References addIPoint(), VBentoIPoint::DATA_TYPE_ID(), NULL, and VBentoIPoint::setValue().

void VBentoNode::setPoint3D ( const VString name,
const VPoint3D value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2381 of file vbento.cpp.

References addPoint3D(), VBentoPoint3D::DATA_TYPE_ID(), NULL, and VBentoPoint3D::setValue().

void VBentoNode::setIPoint3D ( const VString name,
const VIPoint3D value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2389 of file vbento.cpp.

References addIPoint3D(), VBentoIPoint3D::DATA_TYPE_ID(), NULL, and VBentoIPoint3D::setValue().

void VBentoNode::setLine ( const VString name,
const VLine value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2397 of file vbento.cpp.

References addLine(), VBentoLine::DATA_TYPE_ID(), NULL, and VBentoLine::setValue().

void VBentoNode::setILine ( const VString name,
const VILine value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2405 of file vbento.cpp.

References addILine(), VBentoILine::DATA_TYPE_ID(), NULL, and VBentoILine::setValue().

void VBentoNode::setRect ( const VString name,
const VRect value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2413 of file vbento.cpp.

References addRect(), VBentoRect::DATA_TYPE_ID(), NULL, and VBentoRect::setValue().

void VBentoNode::setIRect ( const VString name,
const VIRect value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2421 of file vbento.cpp.

References addIRect(), VBentoIRect::DATA_TYPE_ID(), NULL, and VBentoIRect::setValue().

void VBentoNode::setPolygon ( const VString name,
const VPolygon value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2429 of file vbento.cpp.

References addPolygon(), VBentoPolygon::DATA_TYPE_ID(), NULL, and VBentoPolygon::setValue().

void VBentoNode::setIPolygon ( const VString name,
const VIPolygon value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2437 of file vbento.cpp.

References addIPolygon(), VBentoIPolygon::DATA_TYPE_ID(), NULL, and VBentoIPolygon::setValue().

void VBentoNode::setColor ( const VString name,
const VColor value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2445 of file vbento.cpp.

References addColor(), VBentoColor::DATA_TYPE_ID(), NULL, and VBentoColor::setValue().

void VBentoNode::setS64 ( const VString name,
Vs64  value 
)

Updates or adds the specified attribute of the node.

Parameters:
namethe attribute name
valuethe attribute value

Definition at line 2453 of file vbento.cpp.

References addS64(), VBentoS64::DATA_TYPE_ID(), NULL, and VBentoS64::setValue().

const VBentoAttributePtrVector & VBentoNode::getAttributes ( ) const

Returns the vector of attribute objects attached to this object.

Returns:
the attributes vector, which is a vector of pointers

Definition at line 2461 of file vbento.cpp.

const VString & VBentoNode::getName ( ) const

Returns the node's name.

Returns:
a reference to the name string

Definition at line 2465 of file vbento.cpp.

void VBentoNode::setName ( const VString name)

Sets the node's name.

Parameters:
namethe name to give the node

Definition at line 2469 of file vbento.cpp.

void VBentoNode::writeToXMLTextStream ( VTextIOStream stream,
bool  lineWrap = false,
int  indentDepth = 0 
) const

Writes the object, including its attributes and contained child objects, to an XML text stream.

Parameters:
streamthe stream to write to
lineWraptrue if each bento node should start on its own indented line
indentDepthif lineWrap is true, the indent level depth of this node

Definition at line 2473 of file vbento.cpp.

References VString::chars(), and VTextIOStream::writeString().

void VBentoNode::clear ( )

Deletes all attributes and children (recursive) from this node.

This node remains with the same name, but everything beneath it is destroyed. Be certain that no one has retained pointers to child nodes nor references to attributes of this or any child node, before calling this method. This method may be useful if you build a Bento hierarchy, serialize it, and then wish to re-use the base node.

Definition at line 1476 of file vbento.cpp.

void VBentoNode::orphanAttributes ( )

Removes all attribute references from this node.

Presumably the caller is now responsible for those objects, including their deletion.

Definition at line 1489 of file vbento.cpp.

void VBentoNode::orphanNodes ( )

Removes all child node references from this node.

Presumably the caller is now responsible for those nodes, including their deletion.

Definition at line 1493 of file vbento.cpp.

References NULL.

void VBentoNode::orphanNode ( const VBentoNode node)

Removes a particular child node reference from this node.

Presumably the caller is now responsible for the node, including its deletion. If the node is not found, nothing happens.

Parameters:
nodethe child node to remove from this node's child list

Definition at line 1501 of file vbento.cpp.

References NULL.

void VBentoNode::adoptFrom ( VBentoNode node)

Adopts the entire set of attributes and children from the specified node.

The supplied node will be modified with calls to orphanAttributes and orphanNodes, because this node now owns those objects in memory.

Parameters:
nodethe node from which to adopt attributes and children

Definition at line 1509 of file vbento.cpp.

References clear(), getName(), orphanAttributes(), and orphanNodes().

void VBentoNode::updateFrom ( const VBentoNode node)

Updates this bento node with the attributes and children from the specified node, using the following rules:

  • If the source node name is non-empty, this node's name is updated with it.
  • For each source attribute, if this node has an attribute of the same name and type, it is replaced; otherwise the attribute is added.
  • For each source child node, if this node has a child of the same name it is updated (recursively, using these rules); otherwise a copy of the source child hierarchy is added. The source node is not modified and this node does not retain a reference to it.
    Parameters:
    nodethe node from which to copy attributes and children

Definition at line 1528 of file vbento.cpp.

References addChildNode(), findNode(), getAttributes(), getName(), getNodes(), VString::isNotEmpty(), NULL, and VBentoNode().


The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.