From 03ff5150ac1fd3f9205fc34bec91730f646a20f3 Mon Sep 17 00:00:00 2001 From: Chris Punches Date: Sun, 25 Jun 2017 14:07:10 -0400 Subject: [PATCH] task/plan work --- src/loaders/Plan.h | 5 ++--- src/loaders/Task.cpp | 10 ++++++---- src/loaders/Task.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/loaders/Plan.h b/src/loaders/Plan.h index 60c995c..b5ccc02 100644 --- a/src/loaders/Plan.h +++ b/src/loaders/Plan.h @@ -6,7 +6,6 @@ #include "JSON_Loader.h" #include "Task.h" - class Plan: public JSON_Loader { private: @@ -26,10 +25,10 @@ class Plan: public JSON_Loader void get_task( Task & result, int index, bool verbose ); // load unit definitions from a provided suite and import them into individual tasks - // void load_definitions( Suite unit_definitions ); + void load_definitions( Suite unit_definitions ); // fetch a corresponding Unit to a Task - // void get_definition_from_task(Unit & result, Task input, bool verbose ); + void get_definition_from_task(Unit & result, Task input, bool verbose ); }; #endif //FTESTS_PLAN_H diff --git a/src/loaders/Task.cpp b/src/loaders/Task.cpp index 65dd153..f24aa90 100644 --- a/src/loaders/Task.cpp +++ b/src/loaders/Task.cpp @@ -9,7 +9,11 @@ class Task_InvalidDataStructure: public std::runtime_error { public: /// execute, and its dependencies on other units to have already been completed successfully. Task::Task() {} -int Task::load_root(Json::Value loader_root) +/// Task::load_root() - loads json values to private members +/// +/// \param loader_root +/// \return +void Task::load_root(Json::Value loader_root) { if ( loader_root.isMember("name") ) { @@ -18,10 +22,8 @@ int Task::load_root(Json::Value loader_root) throw Task_InvalidDataStructure(); } - - // this->dependencies = loader_root.get("depends on", ""); + this->dependencies = loader_root.get("depends on", ""); //this->has_succeeded = false; - } std::string Task::get_name() diff --git a/src/loaders/Task.h b/src/loaders/Task.h index 9cdd440..3d7f421 100644 --- a/src/loaders/Task.h +++ b/src/loaders/Task.h @@ -26,7 +26,7 @@ class Task Task(); // load a json::value into task members (second stage deserialization) - int load_root( Json::Value loader_root ); + void load_root( Json::Value loader_root ); // register a dependency void add_dependency( std::string dependency_name );