Rhino C++ API
8.13
|
#include <opennurbs_xml.h>
Classes | |
class | CharacterCounts |
class | ChildIterator |
< Iteration. More... | |
class | PropertyIterator |
Public Member Functions | |
ON_XMLNode (const ON_XMLNode &) | |
ON_XMLNode (const wchar_t *name) | |
Always creates empty default property. More... | |
ON_XMLNode (ON_XMLNode &&) noexcept=delete | |
virtual | ~ON_XMLNode () |
virtual ON_XMLNode * | AttachChildNode (ON_XMLNode *node) |
virtual ON_XMLProperty * | AttachProperty (ON_XMLProperty *prop) |
virtual int | ChildCount (void) const |
virtual void | Clear (void) |
Removes and deletes all child nodes and properties, and clears the tag name. More... | |
virtual ON_XMLNode * | CreateNodeAtPath (const wchar_t *path) |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder, bool recursive) const |
virtual ON_XMLNode * | DetachChild (ON_XMLNode &child) |
virtual ON_XMLNode * | FirstChild (void) const |
Get the first child of this node or null if none. More... | |
virtual ChildIterator | GetChildIterator (void) const |
virtual ON_XMLProperty & | GetDefaultProperty (void) const |
virtual ON_XMLNode * | GetNamedChild (const wchar_t *name) const |
Use this when you are looking for a node that is only one child below - non-recursive, but fast. More... | |
virtual ON_XMLProperty * | GetNamedProperty (const wchar_t *name) const |
virtual int | GetNestedDepth (void) const |
virtual ON_XMLNode * | GetNodeAtPath (const wchar_t *path) const |
virtual ON_wString | GetPathFromRoot (void) const |
Returns the full path to this node. More... | |
virtual PropertyIterator | GetPropertyIterator (bool alphabetized=false) const |
virtual void * | LastReadBufferPointer (void) const |
virtual bool | MergeFrom (const ON_XMLNode &src) |
src node must have the same name More... | |
virtual void | MoveAfter (ON_XMLNode &other) |
Moves this node after another node. More... | |
virtual void | MoveBefore (ON_XMLNode &other) |
Moves this node before another node. More... | |
virtual ON_XMLNode * | NextSibling (void) const |
Get the next sibling of this node or null if none. More... | |
virtual void | OnNodeReadFromStream (const ON_XMLNode *node) const |
This function is called on the top-most node during the reading process. More... | |
operator ON_wString () const | |
bool | operator!= (const ON_XMLNode &) const |
const ON_XMLNode & | operator= (const ON_XMLNode &) |
bool | operator== (const ON_XMLNode &) const |
virtual ON_XMLNode * | Parent (void) const |
Get the parent of this node or null if none. More... | |
virtual ON_XMLNode * | PrevSibling (void) const |
Get the previous sibling of this node or null if none. More... | |
virtual int | PropertyCount (void) const |
< Utilities. More... | |
virtual ON__UINT32 | ReadFromStream (const wchar_t *buf, bool warnings_as_errors=false, bool validate_tags=true) |
virtual bool | RecurseChildren (ON_XMLRecurseChildrenCallback callback, void *data) const |
virtual void | Remove (void) |
Removes and deletes this node. More... | |
virtual void | RemoveAllChildren (void) |
Removes and deletes all child nodes. More... | |
virtual void | RemoveAllProperties (void) |
Removes and deletes all properties and adds an empty default property. More... | |
virtual bool | RemoveChild (ON_XMLNode *child) |
virtual bool | RemoveProperty (const wchar_t *prop_name) |
virtual void | SetInternalDebuggingFlags (ON__UINT64) |
For internal use only. More... | |
virtual ON_XMLProperty * | SetProperty (const ON_XMLProperty &prop) |
virtual void | SetTagName (const wchar_t *name) |
virtual ON_wString | String (bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
virtual const ON_wString & | TagName (void) const |
virtual const ON_XMLNode & | TopLevel (void) const |
Get the top-level parent of this node. More... | |
virtual CharacterCounts | WriteChildrenToStream (wchar_t *stream, ON__UINT32 max_chars, bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
virtual CharacterCounts | WriteFooterToStream (wchar_t *stream, ON__UINT32 max_chars, bool include_formatting=true, bool force_long_format=false) const |
virtual CharacterCounts | WriteHeaderToStream (wchar_t *stream, ON__UINT32 max_chars, bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
virtual bool | WriteToSegmentedStream (ON_XMLSegmentedStream &stream, bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
virtual ON__UINT32 | WriteToStream (wchar_t *stream, ON__UINT32 max_chars, bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
virtual CharacterCounts | WriteToStreamEx (wchar_t *stream, ON__UINT32 max_chars, bool include_formatting=true, bool force_long_format=false, bool sorted_props=false) const |
Static Public Member Functions | |
static bool | AutoTypePropValue (void) |
static ON_wString | GetNameFromTag (const wchar_t *tag) |
static bool | IsValidXMLName (const wchar_t *name) |
static bool | IsValidXMLNameWithDebugging (const wchar_t *name) |
static void | SetAutoTypePropValue (bool b=true) |
Static Public Attributes | |
static constexpr ON__UINT32 | ReadError = 0xFFFFFFFF |
< Serialization. More... | |
Protected Member Functions | |
virtual void * | EVF (const wchar_t *func, void *data) |
Emergency virtual function for future expansion. More... | |
Friends | |
class | ON_XMLNodePrivate |
class | ON_XMLNodePropertyIteratorPrivate |
ON_XMLNode::ON_XMLNode | ( | const wchar_t * | name | ) |
Always creates empty default property.
ON_XMLNode::ON_XMLNode | ( | const ON_XMLNode & | ) |
|
deletenoexcept |
|
virtual |
|
virtual |
< Change data. Adds a node as a child of this node. Takes ownership of node. Returns a pointer to node for convenience.
|
virtual |
Attaches a property directly to the node. Takes ownership of the property. Any existing property with the same name is first deleted. For convenience, returns a pointer to the input property.
|
static |
|
virtual |
|
virtual |
Removes and deletes all child nodes and properties, and clears the tag name.
Reimplemented in ON_XMLRootNode.
|
virtual |
Gets a child node given the relative path from the current node. If the node does not exist, it is created. This method should therefore never return null. The returned pointer should not be deleted by the caller. The child node is owned by its immediate parent at that position in the node hierarchy.
|
virtual |
Get the CRC of this node. Param current_remainder is the current remainder value as used by ON_CRC32. Param recursive is true to process nodes recursively, false to process only this node.
|
virtual |
Removes the child node and passes ownership to the caller. Returns the detached node or null on failure.
|
protectedvirtual |
Emergency virtual function for future expansion.
|
virtual |
Get the first child of this node or null if none.
< Hierarchy.
|
virtual |
|
virtual |
|
virtual |
Use this when you are looking for a node that is only one child below - non-recursive, but fast.
|
virtual |
|
static |
|
virtual |
|
virtual |
Gets at nodes deep into the tree using a slash-delimited path, i.e., "child/grandchild/great-grandchild". There's no checking for multiple nodes with the same name at each level of the tree, so if you use these methods, you have to make sure you have unique node names at each level. Gets a child node given the relative path from the current node. If the node does not exist, the method returns null. The returned pointer should not be deleted by the caller. The child node is owned by its immediate parent at that position in the node hierarchy.
|
virtual |
Returns the full path to this node.
|
virtual |
|
static |
|
static |
|
virtual |
|
virtual |
src node must have the same name
|
virtual |
Moves this node after another node.
|
virtual |
Moves this node before another node.
|
virtual |
Get the next sibling of this node or null if none.
|
virtual |
This function is called on the top-most node during the reading process.
ON_XMLNode::operator ON_wString | ( | ) | const |
bool ON_XMLNode::operator!= | ( | const ON_XMLNode & | ) | const |
const ON_XMLNode& ON_XMLNode::operator= | ( | const ON_XMLNode & | ) |
bool ON_XMLNode::operator== | ( | const ON_XMLNode & | ) | const |
|
virtual |
Get the parent of this node or null if none.
|
virtual |
Get the previous sibling of this node or null if none.
|
virtual |
< Utilities.
|
virtual |
|
virtual |
Recursively iterate over the children of this node, calling the supplied callback function for each child. If the callback function returns false, this function will fail. Returns true if successful, false on failure.
|
virtual |
Removes and deletes this node.
|
virtual |
Removes and deletes all child nodes.
|
virtual |
Removes and deletes all properties and adds an empty default property.
|
virtual |
Removes and deletes the child node, if possible. Returns true if successful, else false.
|
virtual |
Removes and deletes the named property, if possible. Returns true if successful, else false.
|
static |
|
virtual |
For internal use only.
|
virtual |
Sets a property on the node. The property is copied and ownership of it remains with the caller. Any existing property with the same name is first deleted. Returns a pointer to the copy of the property.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get the top-level parent of this node.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Writes the node to a wide buffer (AKA 'stream') as XML text. max_chars is the maximum number of wide characters that the buffer can accommodate. To find out how much space is needed without actually writing anything, pass zero. When writing to the buffer, a terminator is written if there is room for it, but the terminator is not included in the returned number of characters.
|
virtual |
|
friend |
|
friend |
|
staticconstexpr |
< Serialization.
Indicates ReadFromStream() failure.