Vuo
2.4.1
|
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_object * | VuoTree_getJson (const VuoTree value) |
Encodes value as a JSON object that can only be decoded in the same process. More... | |
struct json_object * | VuoTree_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_object * | VuoTree_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... | |
char * | VuoTree_getString (const VuoTree value) |
Automatically generated function. More... | |
char * | VuoTree_getInterprocessString (const VuoTree value) |
Automatically generated function. More... | |
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. |
#define VuoTree_REQUIRES_INTERPROCESS_JSON |
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 1172 of file VuoTree.cc.
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 1448 of file VuoTree.cc.
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 1462 of file VuoTree.cc.
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 1436 of file VuoTree.cc.
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 1054 of file VuoTree.cc.
VuoDictionary_VuoText_VuoText VuoTree_getAttributes | ( | VuoTree | tree | ) |
Returns the attributes of the tree's root item.
Definition at line 1028 of file VuoTree.cc.
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 1118 of file VuoTree.cc.
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 1143 of file VuoTree.cc.
Returns the content of the tree's root item and, optionally, of its descendants.
Definition at line 1081 of file VuoTree.cc.
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 807 of file VuoTree.cc.
char * VuoTree_getInterprocessString | ( | const VuoTree | value | ) |
Automatically generated function.
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 791 of file VuoTree.cc.
Returns the name of the tree's root item.
Definition at line 1016 of file VuoTree.cc.
char * VuoTree_getString | ( | const VuoTree | value | ) |
Automatically generated function.
char * VuoTree_getSummary | ( | const VuoTree | value | ) |
Returns a human-readable description of value.
Definition at line 829 of file VuoTree.cc.
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 918 of file VuoTree.cc.
VuoTree VuoTree_makeEmpty | ( | void | ) |
Returns a tree with nothing in it.
Definition at line 910 of file VuoTree.cc.
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.
Returns a tree parsed from json.
Definition at line 944 of file VuoTree.cc.
Returns a tree parsed from xml.
Definition at line 952 of file VuoTree.cc.
void VuoTree_release | ( | VuoTree | value | ) |
Replaces the auto-generated function.
Skips rootXmlNode
since we don't register it.
Definition at line 1004 of file VuoTree.cc.
void VuoTree_retain | ( | VuoTree | value | ) |
Replaces the auto-generated function.
Skips rootXmlNode
since we don't register it.
Definition at line 993 of file VuoTree.cc.
Returns an JSON-formatted string representation of a tree.
Definition at line 971 of file VuoTree.cc.
Returns an XML-formatted string representation of a tree.
Definition at line 960 of file VuoTree.cc.