roviz  0.7
Code Documentation of roviz
Public Member Functions | List of all members
ConfigImplCmdline< T > Class Template Reference

The Config implementation for the Cmdline backend. More...

#include <config_impl_cmdline.h>

Inheritance diagram for ConfigImplCmdline< T >:
Inheritance graph
Collaboration diagram for ConfigImplCmdline< T >:
Collaboration graph

Public Member Functions

void * value (void) override
 Get the value of the config. More...
 
void load (std::string value) override
 Load the value from a string. More...
 
void lock (void) override
 Lock the mutex of the config. More...
 
void unlock (void) override
 Unlock the mutex of the config. More...
 
bool changed (void) override
 Check if the config value changed. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 
template<>
void load (std::string value)
 Load the value from a string. More...
 

Detailed Description

template<class T>
class ConfigImplCmdline< T >

The Config implementation for the Cmdline backend.

This implementation can only load a value from a string. Once it is loaded, it doesn't change anymore.

See also
Config
ConfigImpl
ConfigImplBaseCmdline

Member Function Documentation

◆ changed()

template<class T >
bool ConfigImplCmdline< T >::changed ( void  )
overridevirtual

Check if the config value changed.

Returns
false

Always returns false, because with that backend, the configs cannot change.

See also
ConfigImpl::changed

Implements ConfigImpl.

◆ load() [1/7]

template<>
void ConfigImplCmdline< int >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ load() [2/7]

template<>
void ConfigImplCmdline< double >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ load() [3/7]

template<>
void ConfigImplCmdline< std::string >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ load() [4/7]

template<>
void ConfigImplCmdline< std::list< std::string > >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ load() [5/7]

template<>
void ConfigImplCmdline< bool >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ load() [6/7]

template<class T >
void ConfigImplCmdline< T >::load ( std::string  value)
overridevirtual

Load the value from a string.

Parameters
valueThe string representation of the value

This has to be done before the thread is run. Otherwise a race condition might happen because we don't lock anything.

See also
ConfigImplBaseCmdline::load

Implements ConfigImplBaseCmdline.

◆ load() [7/7]

template<>
void ConfigImplCmdline< FilePath >::load ( std::string  value)
virtual

Load the value from a string.

Parameters
valueThe string representation of the value

ConfigImplCmdline will determine how to parse the string based on its template type.

Implements ConfigImplBaseCmdline.

◆ lock()

template<class T >
void ConfigImplCmdline< T >::lock ( void  )
overridevirtual

Lock the mutex of the config.

As it will never happend that two threads access this config at the same time, which is guaranteed by the design of the Cmdline framework, this function doesn't do anything.

See also
ConfigImpl::lock
unlock

Implements ConfigImpl.

◆ unlock()

template<class T >
void ConfigImplCmdline< T >::unlock ( void  )
overridevirtual

Unlock the mutex of the config.

As it will never happend that two threads access this config at the same time, which is guaranteed by the design of the Cmdline framework, this function doesn't do anything.

See also
ConfigImpl::unlock
lock

Implements ConfigImpl.

◆ value()

template<class T >
void * ConfigImplCmdline< T >::value ( void  )
overridevirtual

Get the value of the config.

Returns
A pointer to the value
See also
ConfigImpl::value

Implements ConfigImpl.


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