summaryrefslogtreecommitdiff
path: root/NT/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-01-20 15:45:55 +0000
committerTim Redfern <tim@eclectronics.org>2014-01-20 15:45:55 +0000
commit527de97cfc179420d64c0a66026f3f2b752ce8f7 (patch)
tree8500ff7b9a9246e000a621c0c75dbd680242165f /NT/src
parent6ae7506f595d45e752ffd0cebb6392c707db2d3c (diff)
making json loader
Diffstat (limited to 'NT/src')
-rw-r--r--NT/src/graph.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/NT/src/graph.cpp b/NT/src/graph.cpp
index 6c8ccf2..3fec39d 100644
--- a/NT/src/graph.cpp
+++ b/NT/src/graph.cpp
@@ -32,8 +32,8 @@ bool Graph::load_file(std::string filename,std::string media_path){
bool Graph::parse_json(string &data,string &media_path){
Json::Value root; // will contain the root value after parsing.
Json::Reader reader;
- bool parsingSuccessful = reader.parse( data, root );
- if ( !parsingSuccessful )
+ bool parsing_successful = reader.parse( data, root );
+ if ( !parsing_successful )
{
std::cout << "Failed to parse configuration\n"
<< reader.getFormattedErrorMessages();
@@ -59,6 +59,9 @@ bool Graph::parse_json(string &data,string &media_path){
//some of which contain arrays of pointers to variables
//
//on our right.. an unordered map of nodes to be linked to
+ //
+ //node.create_links(nodes)
+ //will allow the nodes to be passed into each member of a variable array
for (auto var: node->vars){