diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d7d6338..ab27815 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -15,18 +15,10 @@
-
-
-
-
-
-
-
-
@@ -59,12 +51,11 @@
-
-
+
+
-
-
+
@@ -109,8 +100,8 @@
-
-
+
+
@@ -125,8 +116,8 @@
-
-
+
+
@@ -172,10 +163,10 @@
-
+
@@ -523,12 +514,12 @@
-
+
-
+
@@ -612,8 +603,7 @@
-
-
+
@@ -744,8 +734,7 @@
-
-
+
@@ -1022,16 +1011,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1058,21 +1037,22 @@
-
-
+
+
-
-
+
-
+
-
-
-
+
+
+
+
+
@@ -1090,5 +1070,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o
index 5f91c61..66152b7 100644
Binary files a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o and b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o differ
diff --git a/cmake-build-debug/ftests b/cmake-build-debug/ftests
index 7dc289a..b1309e2 100755
Binary files a/cmake-build-debug/ftests and b/cmake-build-debug/ftests differ
diff --git a/src/loaders/Plan.cpp b/src/loaders/Plan.cpp
index 4eb8bc3..b90675a 100644
--- a/src/loaders/Plan.cpp
+++ b/src/loaders/Plan.cpp
@@ -26,23 +26,24 @@ Json::Value Task::set_dependencies()
int Plan::num_tasks()
+// returns the number of tasks in a Plan
{
return (int)this->tasks.size();
}
-
-Task Plan::select_task_index(int index) {
+Task Plan::select_task_index(int index)
+// returns a task from its parent Plan by index
+{
return this->tasks[index];
}
Task Plan::select_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;
@@ -63,14 +64,13 @@ Task Plan::select_task( std::string provided_name )
}
return * returnable;
- }
}
Plan::Plan( std::string filename ): JLoader( filename )
-{
/* Plan loads a file and deserializes the Unit JSON object to Task types as a vector member
* Plan { vector }
*/
+{
Json::Value raw_tasks = this->get_root()["plan"];
for ( int index = 0; index < raw_tasks.size(); index++ )