EMANE  1.2.1
EMANE::ConfigurationRegistrarProxy Class Reference

Provides component specific proxy access to the configuration service. More...

#include <configurationregistrarproxy.h>

Inheritance diagram for EMANE::ConfigurationRegistrarProxy:
EMANE::ConfigurationRegistrar

Public Member Functions

 ConfigurationRegistrarProxy (ConfigurationService &service, BuildId buildId)
 
void registerValidator (ConfigurationValidator validator) override
 
template<typename T >
void registerNumeric (const std::string &sName, const ConfigurationProperties &properties=ConfigurationProperties::NONE, const std::initializer_list< T > &values={}, const std::string &sUsage="", T minValue=std::numeric_limits< T >::lowest(), T maxValue=std::numeric_limits< T >::max(), std::size_t minOccurs=1, std::size_t maxOccurs=1, const std::string &sRegexPattern={})
 
template<typename T >
void registerNonNumeric (const std::string &sName, const ConfigurationProperties &properties=ConfigurationProperties::NONE, const std::initializer_list< T > &values={}, const std::string &sUsage="", std::size_t minOccurs=1, std::size_t maxOccurs=1, const std::string &sRegexPattern={})
 

Detailed Description

Provides component specific proxy access to the configuration service.

Definition at line 49 of file configurationregistrarproxy.h.

Constructor & Destructor Documentation

◆ ConfigurationRegistrarProxy()

EMANE::ConfigurationRegistrarProxy::ConfigurationRegistrarProxy ( ConfigurationService service,
BuildId  buildId 
)

Creates a ConfigurationRegistrarProxy.

Parameters
serviceReference to the configuration service
buildIdBUild id associated with the proxy

Definition at line 35 of file configurationregistrarproxy.cc.

Member Function Documentation

◆ registerNonNumeric()

template<typename T >
void EMANE::ConfigurationRegistrar::registerNonNumeric ( const std::string &  sName,
const ConfigurationProperties properties = ConfigurationProperties::NONE,
const std::initializer_list< T > &  values = {},
const std::string &  sUsage = "",
std::size_t  minOccurs = 1,
std::size_t  maxOccurs = 1,
const std::string &  sRegexPattern = {} 
)
inherited

Registers a non-numeric configuration item

Parameters
sNameName of the configuration item to be registered
propertiesConfiguration properties mask
valuesDefault configuration values
sUsageParameter usage description
minOccursMinimum values allowed
maxOccursMaximum values allowed
sRegexPatternRegular expression to match against
Exceptions
ConfigurationExceptionThrow when a registration error occurs.

Definition at line 68 of file configurationregistrar.inl.

◆ registerNumeric()

template<typename T >
void EMANE::ConfigurationRegistrar::registerNumeric ( const std::string &  sName,
const ConfigurationProperties properties = ConfigurationProperties::NONE,
const std::initializer_list< T > &  values = {},
const std::string &  sUsage = "",
minValue = std::numeric_limits<T>::lowest(),
maxValue = std::numeric_limits<T>::max(),
std::size_t  minOccurs = 1,
std::size_t  maxOccurs = 1,
const std::string &  sRegexPattern = {} 
)
inherited

Registers a numeric configuration item

Parameters
sNameName of the configuration item to be registered
propertiesConfiguration properties mask
valuesDefault configuration values
sUsageParameter usage description
minValueMinimum acceptable value
maxValueMaximum acceptable value
minOccursMinimum values allowed
maxOccursMaximum values allowed
sRegexPatternRegular expression to match against
Exceptions
ConfigurationExceptionThrow when a registration error occurs.

Definition at line 42 of file configurationregistrar.inl.

◆ registerValidator()

void EMANE::ConfigurationRegistrarProxy::registerValidator ( ConfigurationValidator  validator)
overridevirtual

Registers a ConfigurationValidator callable. This callable is passed the complete list of configuration sent to an NEM during Component::configure() and RunningStateMutable::processConfiguration(). The validator returns true to indicate the configuration is valid and flase to indicate an error.

Parameters
validator
Note
Configuration updates are transactional, so when a validator returns flase the NEM will not see any of the configuration passed in via Component::configure() or RunningStateMutable::processConfiguration().
For RunningStateMutable::processConfiguration() a validator is the only way to indicate an error in the configuration.

Implements EMANE::ConfigurationRegistrar.

Definition at line 84 of file configurationregistrarproxy.cc.


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