ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
modelspace::NodeBuilder Class Reference

Generate a list of mapped nodes and connections from json. More...

#include <NodeBuilder.h>

Public Member Functions

 NodeBuilder ()
 Default constructor. Does nothing.
 
 ~NodeBuilder ()
 Default destructor. Does nothing.
 
int parseNodeList (const std::string &filename, const std::string &node_key="")
 Load a list of nodes in from json file.
 
std::vector< ImNode > & nodeList ()
 Return list of nodes.
 

Protected Attributes

std::vector< ImNode_node_list
 

Detailed Description

Generate a list of mapped nodes and connections from json.

NodeBuilder receives a json file input with a list of nodes and connections and builds a list of nodes from it.

Member Function Documentation

◆ nodeList()

std::vector< ImNode > & modelspace::NodeBuilder::nodeList ( )
inline

Return list of nodes.

Returns
List of nodes

◆ parseNodeList()

int modelspace::NodeBuilder::parseNodeList ( const std::string &  filename,
const std::string &  node_key = "" 
)

Load a list of nodes in from json file.

Parameters
filenameThe name of the json file to load from
node_keyThe json key at which nodes are stored. Default is no key ("")
Returns
Error code corresponding to success/failure

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