suite reimpl started, good stopping point

This commit is contained in:
Chris Punches
2017-06-09 00:49:56 -04:00
parent 7db682e503
commit eef2dd2173
13 changed files with 228 additions and 211 deletions

View File

@@ -31,6 +31,6 @@ public:
// safely handle key retrieval (if we want it to be safe)
// next iter should be:
int JSON_Loader::get_key( Json::Value &input, std::string key, bool verbose, bool safety);
int get_key( Json::Value &input, std::string key, bool verbose, bool safety);
};
#endif //FTESTS_JLOADER_H

View File

@@ -41,11 +41,14 @@ Task Plan::get_task(std::string provided_name)
return * returnable;
}
Plan::Plan( std::string filename ): JSON_Loader( filename )
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 { vector<Task> }
*/
{
// plan always loads from file
this->load_json_file( filename );
Json::Value raw_tasks = this->as_serialized()["plan"];
for ( int index = 0; index < raw_tasks.size(); index++ )

View File

@@ -1,7 +1,7 @@
#include "Suite.h"
Suite::Suite(): JSON_Loader() {}
Suite::Suite( std::string filename ): JSON_Loader( filename )
Suite::Suite( std::string filename ): JSON_Loader()
/* Suite loads a file and deserializes the Unit JSON object to Unit types as a vector member
* Suite { vector<Unit> }
*/

View File

@@ -14,7 +14,6 @@ class Suite: public JSON_Loader
public:
// constructor
Suite( std::string filename );
Suite();
int load_file( std::string filename );
// returns the unit type identified by name or null