rex/examplar.cpp

29 lines
977 B
C++
Raw Normal View History

2017-04-18 23:04:21 +00:00
#include <iostream>
#include "src/json/json.h"
2017-04-22 12:07:11 +00:00
#include "src/loaders/loaders.h"
2017-04-18 23:04:21 +00:00
int main( )
2017-04-18 23:04:21 +00:00
{
2017-06-23 19:24:11 +00:00
bool verbose = true;
// A Plan is made up of Tasks, and a Suite is made up of Units.
// A Plan declares what units are executed and a Suite declares the definitions of those units.
Conf configuration = Conf("/home/phanes/Development/internal/Examplar/conf/config.json", verbose );
2017-04-19 05:50:34 +00:00
// load the configuration file which contains filepaths to definitions of a plan and definitions of units.
std::string definitions_file = configuration.get_units_path();
std::string plan_file = configuration.get_plan_path();
2017-04-19 06:27:54 +00:00
2017-06-18 14:39:46 +00:00
Suite available_definitions;
2017-06-23 19:24:11 +00:00
available_definitions.load_units_file( definitions_file, verbose );
2017-06-23 20:02:19 +00:00
Plan plan;
2017-06-25 06:28:22 +00:00
plan.load_plan_file( plan_file, verbose );
plan.load_definitions( available_definitions, verbose );
2017-04-19 05:50:34 +00:00
std::cout << "Ready to execute all tasks in Plan." << std::endl;
plan.execute( verbose );
2017-04-18 23:04:21 +00:00
return 0;
}