readded confs, some basic exception handling, and reworking conf now

This commit is contained in:
Chris Punches
2017-06-11 15:14:45 -04:00
parent 82d768e3c1
commit b36e6acabd
11 changed files with 142 additions and 74 deletions

View File

@@ -1,5 +1,5 @@
#include "Plan.h"
/*
int Plan::num_tasks()
// returns the number of tasks in a Plan
{
@@ -13,11 +13,10 @@ Task Plan::get_task(int index)
}
Task Plan::get_task(std::string provided_name)
/*
* returns a task from a Plan object by name
* this will need reworked. maybe should return int, populate a pointer.
* error handling is the concern here.
*/
{
Task * returnable;
bool foundMatch = false;
@@ -42,9 +41,9 @@ Task Plan::get_task(std::string provided_name)
}
Plan::Plan( std::string filename ): JSON_Loader()
/* Plan loads a file and deserializes the Unit JSON object to Task types as a vector member
Plan loads a file and deserializes the Unit JSON object to Task types as a vector member
* Plan { vector<Task> }
*/
{
// plan always loads from file
this->load_json_file( filename );
@@ -56,3 +55,4 @@ Plan::Plan( std::string filename ): JSON_Loader()
this->tasks.push_back( Task( raw_tasks[index] ) );
}
};
*/