Vuo  2.3.2
Classes | Macros | Functions

Description

Hierarchically structured information.

Classes

struct  VuoTree
 Hierarchically structured information. More...
 

Macros

#define VuoTree_REQUIRES_INTERPROCESS_JSON
 This type has a _getInterprocessJson() function. More...
 

Functions

VuoTree VuoTree_makeFromJson (struct json_object *js)
 Decodes the JSON object js to create a new value. More...
 
struct json_objectVuoTree_getJson (const VuoTree value)
 Encodes value as a JSON object that can only be decoded in the same process. More...
 
struct json_objectVuoTree_getInterprocessJson (const VuoTree value)
 Encodes value as a JSON object that can be decoded in a separate process. More...
 
char * VuoTree_getSummary (const VuoTree value)
 Returns a human-readable description of value. More...
 
VuoTree VuoTree_makeEmpty (void)
 Returns a tree with nothing in it. More...
 
VuoTree VuoTree_make (VuoText name, VuoDictionary_VuoText_VuoText attributes, VuoText content, VuoList_VuoTree children)
 Returns a tree that consists of the given components. More...
 
VuoTree VuoTree_makeFromJsonText (VuoText json)
 Returns a tree parsed from json. More...
 
VuoTree VuoTree_makeFromXmlText (VuoText xml, bool includeWhitespace)
 Returns a tree parsed from xml. More...
 
VuoText VuoTree_serializeAsXml (VuoTree tree, bool indent)
 Returns an XML-formatted string representation of a tree. More...
 
VuoText VuoTree_serializeAsJson (VuoTree tree, bool indent)
 Returns an JSON-formatted string representation of a tree. More...
 
void VuoTree_retain (VuoTree value)
 Replaces the auto-generated function. More...
 
void VuoTree_release (VuoTree value)
 Replaces the auto-generated function. More...
 
VuoText VuoTree_getName (VuoTree tree)
 Returns the name of the tree's root item. More...
 
VuoDictionary_VuoText_VuoText VuoTree_getAttributes (VuoTree tree)
 Returns the attributes of the tree's root item. More...
 
VuoText VuoTree_getAttribute (VuoTree tree, VuoText attribute)
 Returns the value of the attribute with the given name in the tree's root item, or an empty text if not found. More...
 
VuoText VuoTree_getContent (VuoTree tree, bool includeDescendants)
 Returns the content of the tree's root item and, optionally, of its descendants. More...
 
VuoList_VuoTree VuoTree_getChildren (VuoTree tree)
 Returns a list of the subtrees that are direct descendants of the tree's root item. More...
 
struct json_objectVuoTree_getContainedValue (VuoTree tree)
 Interprets the content and children of the tree as a JSON representation of a Vuo data type value. More...
 
VuoList_VuoTree VuoTree_findItemsUsingXpath (VuoTree tree, VuoText xpath)
 Returns the subtrees found by searching tree with XPath expression xpath, or an empty list if there's an error. More...
 
VuoList_VuoTree VuoTree_findItemsWithName (VuoTree tree, VuoText name, VuoTextComparison comparison, bool includeDescendants)
 Searches tree for subtrees whose name matches name. More...
 
VuoList_VuoTree VuoTree_findItemsWithAttribute (VuoTree tree, VuoText attribute, VuoText value, VuoTextComparison valueComparison, bool includeDescendants)
 Searches tree for subtrees that have an attribute called attribute (exact match) and its value matches value (based on valueComparison). More...
 
VuoList_VuoTree VuoTree_findItemsWithContent (VuoTree tree, VuoText content, VuoTextComparison comparison, bool includeDescendants)
 Searches tree for subtrees whose content matches name. More...
 
VuoTree VuoTree_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoTree_getString (const VuoTree value)
 Automatically generated function. More...
 
char * VuoTree_getInterprocessString (const VuoTree value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoTree

struct VuoTree
Class Members
VuoList_VuoTree children Children of the tree, if it was constructed without parsing from text.
struct json_object * rootJson JSON representation of the tree, if it was parsed from JSON.
void * rootXmlNode XML representation of the tree — an xmlNode * of type element node.

Macro Definition Documentation

◆ VuoTree_REQUIRES_INTERPROCESS_JSON

#define VuoTree_REQUIRES_INTERPROCESS_JSON

This type has a _getInterprocessJson() function.

Definition at line 41 of file VuoTree.h.

Function Documentation

◆ VuoTree_findItemsUsingXpath()

VuoList_VuoTree VuoTree_findItemsUsingXpath ( VuoTree  tree,
VuoText  xpath 
)

Returns the subtrees found by searching tree with XPath expression xpath, or an empty list if there's an error.

If xpath is a relative path, the root of tree is the context node.

Definition at line 1161 of file VuoTree.cc.

◆ VuoTree_findItemsWithAttribute()

VuoList_VuoTree VuoTree_findItemsWithAttribute ( VuoTree  tree,
VuoText  attribute,
VuoText  value,
VuoTextComparison  valueComparison,
bool  includeDescendants 
)

Searches tree for subtrees that have an attribute called attribute (exact match) and its value matches value (based on valueComparison).

If includeDescendants is false, only the tree's root and its immediate children are searched. If includeDescendants is true, all descendants are searched.

Definition at line 1437 of file VuoTree.cc.

◆ VuoTree_findItemsWithContent()

VuoList_VuoTree VuoTree_findItemsWithContent ( VuoTree  tree,
VuoText  content,
VuoTextComparison  comparison,
bool  includeDescendants 
)

Searches tree for subtrees whose content matches name.

If a subtree contains a child subtree whose content matches, only the child subtree is returned, not the parent.

If includeDescendants is false, only the tree's root and its immediate children are searched. If includeDescendants is true, all descendants are searched.

Definition at line 1451 of file VuoTree.cc.

◆ VuoTree_findItemsWithName()

VuoList_VuoTree VuoTree_findItemsWithName ( VuoTree  tree,
VuoText  name,
VuoTextComparison  comparison,
bool  includeDescendants 
)

Searches tree for subtrees whose name matches name.

If includeDescendants is false, only the tree's root and its immediate children are searched. If includeDescendants is true, all descendants are searched.

Definition at line 1425 of file VuoTree.cc.

◆ VuoTree_getAttribute()

VuoText VuoTree_getAttribute ( VuoTree  tree,
VuoText  attribute 
)

Returns the value of the attribute with the given name in the tree's root item, or an empty text if not found.

Definition at line 1043 of file VuoTree.cc.

◆ VuoTree_getAttributes()

VuoDictionary_VuoText_VuoText VuoTree_getAttributes ( VuoTree  tree)

Returns the attributes of the tree's root item.

Definition at line 1017 of file VuoTree.cc.

◆ VuoTree_getChildren()

VuoList_VuoTree VuoTree_getChildren ( VuoTree  tree)

Returns a list of the subtrees that are direct descendants of the tree's root item.

Definition at line 1107 of file VuoTree.cc.

◆ VuoTree_getContainedValue()

struct json_object* VuoTree_getContainedValue ( VuoTree  tree)

Interprets the content and children of the tree as a JSON representation of a Vuo data type value.

Definition at line 1132 of file VuoTree.cc.

◆ VuoTree_getContent()

VuoText VuoTree_getContent ( VuoTree  tree,
bool  includeDescendants 
)

Returns the content of the tree's root item and, optionally, of its descendants.

Definition at line 1070 of file VuoTree.cc.

◆ VuoTree_getInterprocessJson()

struct json_object* VuoTree_getInterprocessJson ( const VuoTree  value)

Encodes value as a JSON object that can be decoded in a separate process.

Definition at line 796 of file VuoTree.cc.

◆ VuoTree_getInterprocessString()

char* VuoTree_getInterprocessString ( const VuoTree  value)

Automatically generated function.

◆ VuoTree_getJson()

struct json_object* VuoTree_getJson ( const VuoTree  value)

Encodes value as a JSON object that can only be decoded in the same process.

Definition at line 782 of file VuoTree.cc.

◆ VuoTree_getName()

VuoText VuoTree_getName ( VuoTree  tree)

Returns the name of the tree's root item.

Definition at line 1005 of file VuoTree.cc.

◆ VuoTree_getString()

char* VuoTree_getString ( const VuoTree  value)

Automatically generated function.

◆ VuoTree_getSummary()

char* VuoTree_getSummary ( const VuoTree  value)

Returns a human-readable description of value.

Definition at line 818 of file VuoTree.cc.

◆ VuoTree_make()

VuoTree VuoTree_make ( VuoText  name,
VuoDictionary_VuoText_VuoText  attributes,
VuoText  content,
VuoList_VuoTree  children 
)

Returns a tree that consists of the given components.

Definition at line 907 of file VuoTree.cc.

◆ VuoTree_makeEmpty()

VuoTree VuoTree_makeEmpty ( void  )

Returns a tree with nothing in it.

Definition at line 899 of file VuoTree.cc.

◆ VuoTree_makeFromJson()

VuoTree VuoTree_makeFromJson ( struct json_object js)

Decodes the JSON object js to create a new value.

Definition at line 749 of file VuoTree.cc.

◆ VuoTree_makeFromJsonText()

VuoTree VuoTree_makeFromJsonText ( VuoText  json)

Returns a tree parsed from json.

Definition at line 933 of file VuoTree.cc.

◆ VuoTree_makeFromString()

VuoTree VuoTree_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoTree_makeFromXmlText()

VuoTree VuoTree_makeFromXmlText ( VuoText  xml,
bool  includeWhitespace 
)

Returns a tree parsed from xml.

Definition at line 941 of file VuoTree.cc.

◆ VuoTree_release()

void VuoTree_release ( VuoTree  value)

Replaces the auto-generated function.

Skips rootXmlNode since we don't register it.

Definition at line 993 of file VuoTree.cc.

◆ VuoTree_retain()

void VuoTree_retain ( VuoTree  value)

Replaces the auto-generated function.

Skips rootXmlNode since we don't register it.

Definition at line 982 of file VuoTree.cc.

◆ VuoTree_serializeAsJson()

VuoText VuoTree_serializeAsJson ( VuoTree  tree,
bool  indent 
)

Returns an JSON-formatted string representation of a tree.

Definition at line 960 of file VuoTree.cc.

◆ VuoTree_serializeAsXml()

VuoText VuoTree_serializeAsXml ( VuoTree  tree,
bool  indent 
)

Returns an XML-formatted string representation of a tree.

Definition at line 949 of file VuoTree.cc.