EMANE  1.2.1
EMANE::ConfigurationInfo Class Reference

Holds configuration item meta information. More...

#include <configurationinfo.h>

Public Member Functions

 ConfigurationInfo (const std::string &sName, Any::Type type, const ConfigurationProperties &properties, const std::vector< Any > &values, const std::string &sUsage, const Any &minValue, const Any &maxValue, std::size_t minOccurs, std::size_t maxOccurs, const std::string &sRegexPattern)
 
 ConfigurationInfo (const std::string &sName, Any::Type type, const ConfigurationProperties &properties, const std::vector< Any > &values, const std::string &sUsage, std::size_t minOccurs, std::size_t maxOccurs, const std::string &sRegexPattern)
 
Any::Type getType () const
 
const std::string & getName () const
 
bool hasDefault () const
 
bool isRequired () const
 
bool isModifiable () const
 
std::size_t getMinOccurs () const
 
std::size_t getMaxOccurs () const
 
const std::vector< Any > & getValues () const
 
const AnygetMinValue () const
 
const AnygetMaxValue () const
 
const std::string & getUsage () const
 
const std::string & getRegexPattern () const
 
bool isNumberic () const
 
void setValues (const std::vector< Any > &values)
 

Detailed Description

Holds configuration item meta information.

Definition at line 49 of file configurationinfo.h.

Constructor & Destructor Documentation

◆ ConfigurationInfo() [1/2]

EMANE::ConfigurationInfo::ConfigurationInfo ( const std::string &  sName,
Any::Type  type,
const ConfigurationProperties properties,
const std::vector< Any > &  values,
const std::string &  sUsage,
const Any minValue,
const Any maxValue,
std::size_t  minOccurs,
std::size_t  maxOccurs,
const std::string &  sRegexPattern 
)
inline

Creates a ConfiguratonInfo instance for numeric configuration items (ones with min and max values)

Parameters
sNameName of the configuration item
typeUnderlying Any type
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

Definition at line 36 of file configurationinfo.inl.

◆ ConfigurationInfo() [2/2]

EMANE::ConfigurationInfo::ConfigurationInfo ( const std::string &  sName,
Any::Type  type,
const ConfigurationProperties properties,
const std::vector< Any > &  values,
const std::string &  sUsage,
std::size_t  minOccurs,
std::size_t  maxOccurs,
const std::string &  sRegexPattern 
)
inline

Creates a ConfiguratonInfo instance for non-numeric configuration items (ones without min and max values)

Parameters
sNameName of the configuration item
typeUnderlying Any type
propertiesConfiguration properties mask
valuesDefault configuration values
sUsageParameter usage description
minOccursMinimum values allowed
maxOccursMaximum values allowed
sRegexPatternRegular expression to match against

Definition at line 60 of file configurationinfo.inl.

Member Function Documentation

◆ getMaxOccurs()

std::size_t EMANE::ConfigurationInfo::getMaxOccurs ( ) const
inline

Gets the maximum occurrence

Returns
max occurs

Definition at line 118 of file configurationinfo.inl.

◆ getMaxValue()

const EMANE::Any & EMANE::ConfigurationInfo::getMaxValue ( ) const
inline

Gets the maximum allowable value as an Any

Returns
max value reference

Definition at line 136 of file configurationinfo.inl.

◆ getMinOccurs()

std::size_t EMANE::ConfigurationInfo::getMinOccurs ( ) const
inline

Gets the minimum occurrence

Returns
min occurs

Definition at line 112 of file configurationinfo.inl.

◆ getMinValue()

const EMANE::Any & EMANE::ConfigurationInfo::getMinValue ( ) const
inline

Gets the minimum allowable value as an Any

Returns
min value reference

Definition at line 130 of file configurationinfo.inl.

◆ getName()

const std::string & EMANE::ConfigurationInfo::getName ( ) const
inline

Gets the name

Returns
name

Definition at line 82 of file configurationinfo.inl.

◆ getRegexPattern()

const std::string & EMANE::ConfigurationInfo::getRegexPattern ( ) const
inline

Gets the item validation regex

Returns
string regex reference

Definition at line 148 of file configurationinfo.inl.

◆ getType()

EMANE::Any::Type EMANE::ConfigurationInfo::getType ( ) const
inline

Gets the underlying Any type

Returns
type

Definition at line 88 of file configurationinfo.inl.

◆ getUsage()

const std::string & EMANE::ConfigurationInfo::getUsage ( ) const
inline

Gets the item description

Returns
string description reference

Definition at line 142 of file configurationinfo.inl.

◆ getValues()

const std::vector< EMANE::Any > & EMANE::ConfigurationInfo::getValues ( ) const
inline

Gets a reference vector of values as Anys

Returns
vector of Any values

Definition at line 124 of file configurationinfo.inl.

◆ hasDefault()

bool EMANE::ConfigurationInfo::hasDefault ( ) const
inline

Check if there is a default

Returns
true if has default

Definition at line 94 of file configurationinfo.inl.

◆ isModifiable()

bool EMANE::ConfigurationInfo::isModifiable ( ) const
inline

Check if the item is running-state modifiable

Returns
true if running-state modifiable

Definition at line 106 of file configurationinfo.inl.

◆ isNumberic()

bool EMANE::ConfigurationInfo::isNumberic ( ) const
inline

Checks if the item is a numeric type

Returns
true if numeric

Definition at line 154 of file configurationinfo.inl.

◆ isRequired()

bool EMANE::ConfigurationInfo::isRequired ( ) const
inline

Check if the item is required (item must be present)

Returns
true if required

Definition at line 100 of file configurationinfo.inl.

◆ setValues()

void EMANE::ConfigurationInfo::setValues ( const std::vector< Any > &  values)
inline

Sets the item values as Anys

Parameters
valuesvector of Any values

Definition at line 160 of file configurationinfo.inl.


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