OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Configuration Class Reference

#include "Configuration.h"

Inheritance diagram for Configuration:
ot::Serializable

Public Member Functions

virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ot::ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
int importFromEnvironment (void)
 Will load the confiuguration from the environment Returns an exit code (use LDS_EXIT_... macros to determine error: ExitCodes.h) LDS_EXIT_Ok will be returned if no error occured.
 
bool supportsService (const std::string &_serviceName) const
 Returns true if the provided service is supported by this LDS.
 
void setSupportedServices (const std::list< ServiceInformation > &_services)
 
const std::list< ServiceInformation > & supportedServices (void) const
 
void setLauncherPath (const std::string &_launcherPath)
 
const std::string launcherPath (void) const
 
void setServicesLibraryPath (const std::string &_path)
 
const std::string & servicesLibraryPath (void) const
 
void setDefaultMaxCrashRestarts (unsigned int _restarts)
 
unsigned int defaultMaxCrashRestarts (void) const
 
void setDefaultMaxStartupRestarts (unsigned int _restarts)
 
unsigned int defaultMaxStartupRestarts (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Static Public Member Functions

static Configurationinstance (void)
 

Private Member Functions

virtual ~Configuration ()
 

Member Function Documentation

◆ addToJsonObject()

void Configuration::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference
_allocatorAllocator

Implements ot::Serializable.

◆ defaultMaxCrashRestarts()

unsigned int Configuration::defaultMaxCrashRestarts ( void ) const
inline

◆ defaultMaxStartupRestarts()

unsigned int Configuration::defaultMaxStartupRestarts ( void ) const
inline

◆ importFromEnvironment()

int Configuration::importFromEnvironment ( void )

Will load the confiuguration from the environment Returns an exit code (use LDS_EXIT_... macros to determine error: ExitCodes.h) LDS_EXIT_Ok will be returned if no error occured.

◆ instance()

Configuration & Configuration::instance ( void )
static

◆ launcherPath()

const std::string Configuration::launcherPath ( void ) const
inline

◆ servicesLibraryPath()

const std::string & Configuration::servicesLibraryPath ( void ) const
inline

◆ setDefaultMaxCrashRestarts()

void Configuration::setDefaultMaxCrashRestarts ( unsigned int _restarts)
inline

◆ setDefaultMaxStartupRestarts()

void Configuration::setDefaultMaxStartupRestarts ( unsigned int _restarts)
inline

◆ setFromJsonObject()

void Configuration::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setLauncherPath()

void Configuration::setLauncherPath ( const std::string & _launcherPath)
inline

◆ setServicesLibraryPath()

void Configuration::setServicesLibraryPath ( const std::string & _path)
inline

◆ setSupportedServices()

void Configuration::setSupportedServices ( const std::list< ServiceInformation > & _services)
inline

◆ supportedServices()

const std::list< ServiceInformation > & Configuration::supportedServices ( void ) const
inline

◆ supportsService()

bool Configuration::supportsService ( const std::string & _serviceName) const

Returns true if the provided service is supported by this LDS.

◆ ~Configuration()

Configuration::~Configuration ( )
privatevirtual

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