doxygen style documentation started and reworked unit loader in Suite
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
#include "Conf.h"
|
||||
|
||||
class CONF_PLANPATH_INVALID: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
/// CONF_PLANPATH_INVALID - Exception thrown when the Conf type can not load the supplied path for the Plan definition
|
||||
/// file.
|
||||
class CONF_PLANPATH_INVALID: public std::runtime_error { public:
|
||||
CONF_PLANPATH_INVALID(): std::runtime_error("conf: The supplied path for the plan definition file is invalid.") {}
|
||||
};
|
||||
|
||||
class CONF_UNITSPATH_INVALID: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
/// CONF_UNITSPATH_INVALID - Exception thrown when the Conf type can not load the supplied path for the Unit definition
|
||||
/// files.
|
||||
class CONF_UNITSPATH_INVALID: public std::runtime_error { public:
|
||||
CONF_UNITSPATH_INVALID(): std::runtime_error("conf: The supplied path for the unit definition file is invalid.") {}
|
||||
};
|
||||
|
||||
|
||||
/// Conf::Conf - Constructor for Conf type. Loads the configuration for the application.
|
||||
/// TODO Expand to detect when a directory path is supplied for units_path or plan_path and import all Tasks and Units.
|
||||
///
|
||||
/// \param filename - The filename to load the configuration from.
|
||||
Conf::Conf( std::string filename ): JSON_Loader()
|
||||
{
|
||||
// load the conf file.
|
||||
@@ -25,12 +28,8 @@ Conf::Conf( std::string filename ): JSON_Loader()
|
||||
if (this->get_serialized(this->units_path, "units_path", true) != 0 ) { throw CONF_UNITSPATH_INVALID(); }
|
||||
};
|
||||
|
||||
std::string Conf::get_plan_path()
|
||||
{
|
||||
return this->plan_path.asString();
|
||||
}
|
||||
/// Conf::get_plan_path - Retrieves the path to the Plan definition file from the application configuration file.
|
||||
std::string Conf::get_plan_path() { return this->plan_path.asString(); }
|
||||
|
||||
std::string Conf::get_units_path()
|
||||
{
|
||||
return this->units_path.asString();
|
||||
}
|
||||
/// Conf::get_units_path - Retrieves the path to the Unit definition file from the application configuration file.
|
||||
std::string Conf::get_units_path() { return this->units_path.asString(); }
|
||||
|
||||
Reference in New Issue
Block a user