Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::Config Class Referencefinal

Class to manage all of configuration read from and written to JSON file. More...

#include "Config.hpp"

Collaboration diagram for Myra::Config:

Public Member Functions

 Config (const std::string fn="")
 Constructor. More...
 
 ~Config (void)
 Destructor. More...
 
Configload (const std::string fn="/etc/myra-canyon.conf")
 Load configuration from file. More...
 
Configsave (const std::string fn="")
 Save the JSON configuration to the named file. More...
 

Public Attributes

JSON json
 Root (top level) of configuration. More...
 
std::string filename
 Filename where configuration is stored. More...
 

Detailed Description

Class to manage all of configuration read from and written to JSON file.

Constructor & Destructor Documentation

Myra::Config::Config ( const std::string  fn = "")

Constructor.

Here is the call graph for this function:

Myra::Config::~Config ( void  )

Destructor.

Member Function Documentation

Myra::Config & Myra::Config::load ( const std::string  fn = "/etc/myra-canyon.conf")

Load configuration from file.

Here is the call graph for this function:

Here is the caller graph for this function:

Myra::Config & Myra::Config::save ( const std::string  fn = "")

Save the JSON configuration to the named file.

If the filename is empty, then save to the original name from which it was initially loaded.

Here is the call graph for this function:

Member Data Documentation

std::string Myra::Config::filename

Filename where configuration is stored.

JSON Myra::Config::json

Root (top level) of configuration.


The documentation for this class was generated from the following files: