libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
integra_api::INode Class Referenceabstract

Represents a node. More...

#include "api/node.h"

Public Member Functions

virtual const
IInterfaceDefinition
get_interface_definition () const =0
 Get the node's interface definition.
 
virtual const string & get_name () const =0
 Get the node's name.
 
virtual const CPathget_path () const =0
 Get the node's path.
 
virtual const INodeget_parent () const =0
 Get the node's parent. More...
 
virtual const CPathget_parent_path () const =0
 Get node's parent's path. More...
 
virtual const node_map & get_children () const =0
 Get all of a node's child nodes. More...
 
virtual const INodeget_child (const string &child_name) const =0
 Lookup a specific child node. More...
 
virtual const node_endpoint_map & get_node_endpoints () const =0
 Get all of a node's endpoints. More...
 
virtual const INodeEndpointget_node_endpoint (const string &endpoint_name) const =0
 Lookup a specific node endpoint. More...
 
virtual void get_all_node_paths (path_list &results) const =0
 Recursively walk node tree building depth-first pre-order list of all node paths. More...
 

Detailed Description

Represents a node.

Nodes are instances of Integra Modules. Each node has a set of endpoints and can also have child nodes (allowing nodes to form a hierarchy).

Member Function Documentation

virtual void integra_api::INode::get_all_node_paths ( path_list &  results) const
pure virtual

Recursively walk node tree building depth-first pre-order list of all node paths.

Parameters
[out]resultsThe paths of all the nodes are stored in this list
virtual const INode* integra_api::INode::get_child ( const string &  child_name) const
pure virtual

Lookup a specific child node.

Parameters
child_nameThe name of the child node to lookup
Returns
The child node, or NULL if not found
virtual const node_map& integra_api::INode::get_children ( ) const
pure virtual

Get all of a node's child nodes.

Note
libIntegra has no concept of order within sibling nodes. Child nodes can be iterated over, but the order is arbitrary.
Returns
map of child name -> INode *
virtual const INodeEndpoint* integra_api::INode::get_node_endpoint ( const string &  endpoint_name) const
pure virtual

Lookup a specific node endpoint.

Parameters
endpoint_nameThe name of the node endpoint to lookup
Returns
The node endpoint, or NULL if not found
virtual const node_endpoint_map& integra_api::INode::get_node_endpoints ( ) const
pure virtual

Get all of a node's endpoints.

Returns
map of endpoint name -> INodeEndpoint *
virtual const INode* integra_api::INode::get_parent ( ) const
pure virtual

Get the node's parent.

Returns
parent node, or NULL if node resides at top level of node hierarchy
virtual const CPath& integra_api::INode::get_parent_path ( ) const
pure virtual

Get node's parent's path.

Allows relative paths to be resolved without tedious NULL-checking

Returns
parent node's path, or an empty CPath when node has no parent

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