reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::ConfigParse Class Referenceabstract

#include <ConfigParse.hxx>

Inheritance diagram for resip::ConfigParse:
[legend]

Classes

class  Exception
 
class  NestedConfigParse
 

Public Types

typedef HashMap< int, NestedConfigParse > NestedConfigMap
 

Public Member Functions

 ConfigParse ()
 
virtual ~ConfigParse ()
 
virtual void parseConfig (int argc, char **argv, const resip::Data &defaultConfigFilename)
 
virtual void parseConfig (int argc, char **argv, const resip::Data &defaultConfigFilename, int skipCount)
 
virtual void parseCommandLine (int argc, char **argv, int skipCount=0)
 
virtual void parseConfigFile (const resip::Data &filename)
 
virtual void printHelpText (int argc, char **argv)=0
 
void getConfigIndexKeys (const resip::Data &indexName, std::set< resip::Data > &keys) const
 
bool getConfigValue (const resip::Data &name, resip::Data &value) const
 
resip::Data getConfigData (const resip::Data &name, const resip::Data &defaultValue, bool useDefaultIfEmpty=false) const
 
bool getConfigValue (const resip::Data &name, bool &value) const
 
bool getConfigBool (const resip::Data &name, bool defaultValue) const
 
bool getConfigValue (const resip::Data &name, unsigned long &value) const
 
unsigned long getConfigUnsignedLong (const resip::Data &name, unsigned long defaultValue) const
 
bool getConfigValue (const resip::Data &name, int &value) const
 
int getConfigInt (const resip::Data &name, int defaultValue) const
 
bool getConfigValue (const resip::Data &name, unsigned short &value) const
 
unsigned short getConfigUnsignedShort (const resip::Data &name, int defaultValue) const
 
bool getConfigValue (const resip::Data &name, std::vector< resip::Data > &value) const
 
bool getConfigValue (const resip::Data &name, std::vector< int > &value) const
 
bool getConfigValue (const resip::Data &name, std::set< resip::Data > &value) const
 
NestedConfigMap getConfigNested (const resip::Data &mapsPrefix) const
 
bool AddBasePathIfRequired (Data &filename) const
 
void insertConfigValue (const resip::Data &name, const resip::Data &value)
 

Protected Types

typedef HashMultiMap< resip::Data, resip::Data > ConfigValuesMap
 

Protected Member Functions

template<typename T >
bool translateConfigValue (const std::map< T, resip::Data > dict, const resip::Data &name, T &value) const
 
void insertConfigValue (const Data &source, ConfigValuesMap &configValues, const resip::Data &name, const resip::Data &value)
 
resip::Data removePath (const resip::Data &fileAndPath) const
 

Protected Attributes

ConfigValuesMap mCmdLineConfigValues
 
ConfigValuesMap mFileConfigValues
 
ConfigValuesMap mConfigValues
 
resip::Data mCmdLineConfigFilename
 
resip::Data mConfigBasePath
 

Friends

EncodeStream & operator<< (EncodeStream &strm, const ConfigParse &config)
 

Detailed Description

Definition at line 14 of file ConfigParse.hxx.

Member Typedef Documentation

◆ ConfigValuesMap

◆ NestedConfigMap

Constructor & Destructor Documentation

◆ ConfigParse()

resip::ConfigParse::ConfigParse ( )

Definition at line 23 of file ConfigParse.cxx.

◆ ~ConfigParse()

resip::ConfigParse::~ConfigParse ( )
virtual

Definition at line 27 of file ConfigParse.cxx.

Member Function Documentation

◆ AddBasePathIfRequired()

bool resip::ConfigParse::AddBasePathIfRequired ( Data &  filename) const

Definition at line 509 of file ConfigParse.cxx.

◆ getConfigBool()

bool resip::ConfigParse::getConfigBool ( const resip::Data &  name,
bool  defaultValue 
) const

Definition at line 289 of file ConfigParse.cxx.

◆ getConfigData()

Data resip::ConfigParse::getConfigData ( const resip::Data &  name,
const resip::Data &  defaultValue,
bool  useDefaultIfEmpty = false 
) const

Definition at line 248 of file ConfigParse.cxx.

◆ getConfigIndexKeys()

void resip::ConfigParse::getConfigIndexKeys ( const resip::Data &  indexName,
std::set< resip::Data > &  keys 
) const

Definition at line 207 of file ConfigParse.cxx.

◆ getConfigInt()

int resip::ConfigParse::getConfigInt ( const resip::Data &  name,
int  defaultValue 
) const

Definition at line 334 of file ConfigParse.cxx.

◆ getConfigNested()

ConfigParse::NestedConfigMap resip::ConfigParse::getConfigNested ( const resip::Data &  mapsPrefix) const

Definition at line 438 of file ConfigParse.cxx.

◆ getConfigUnsignedLong()

unsigned long resip::ConfigParse::getConfigUnsignedLong ( const resip::Data &  name,
unsigned long  defaultValue 
) const

Definition at line 311 of file ConfigParse.cxx.

◆ getConfigUnsignedShort()

unsigned short resip::ConfigParse::getConfigUnsignedShort ( const resip::Data &  name,
int  defaultValue 
) const

Definition at line 357 of file ConfigParse.cxx.

◆ getConfigValue() [1/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
bool &  value 
) const

Definition at line 259 of file ConfigParse.cxx.

◆ getConfigValue() [2/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
int &  value 
) const

Definition at line 319 of file ConfigParse.cxx.

◆ getConfigValue() [3/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
resip::Data &  value 
) const

Definition at line 234 of file ConfigParse.cxx.

◆ getConfigValue() [4/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
std::set< resip::Data > &  value 
) const

Definition at line 410 of file ConfigParse.cxx.

◆ getConfigValue() [5/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
std::vector< int > &  value 
) const

Definition at line 393 of file ConfigParse.cxx.

◆ getConfigValue() [6/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
std::vector< resip::Data > &  value 
) const

Definition at line 365 of file ConfigParse.cxx.

◆ getConfigValue() [7/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
unsigned long &  value 
) const

Definition at line 297 of file ConfigParse.cxx.

◆ getConfigValue() [8/8]

bool resip::ConfigParse::getConfigValue ( const resip::Data &  name,
unsigned short &  value 
) const

Definition at line 342 of file ConfigParse.cxx.

◆ insertConfigValue() [1/2]

void resip::ConfigParse::insertConfigValue ( const Data &  source,
ConfigValuesMap &  configValues,
const resip::Data &  name,
const resip::Data &  value 
)
protected

Definition at line 473 of file ConfigParse.cxx.

◆ insertConfigValue() [2/2]

void resip::ConfigParse::insertConfigValue ( const resip::Data &  name,
const resip::Data &  value 
)

Definition at line 488 of file ConfigParse.cxx.

◆ parseCommandLine()

void resip::ConfigParse::parseCommandLine ( int  argc,
char **  argv,
int  skipCount = 0 
)
virtual

Definition at line 66 of file ConfigParse.cxx.

◆ parseConfig() [1/2]

void resip::ConfigParse::parseConfig ( int  argc,
char **  argv,
const resip::Data &  defaultConfigFilename 
)
virtual

Reimplemented in reTurn::ReTurnConfig.

Definition at line 32 of file ConfigParse.cxx.

◆ parseConfig() [2/2]

void resip::ConfigParse::parseConfig ( int  argc,
char **  argv,
const resip::Data &  defaultConfigFilename,
int  skipCount 
)
virtual

Definition at line 38 of file ConfigParse.cxx.

◆ parseConfigFile()

void resip::ConfigParse::parseConfigFile ( const resip::Data &  filename)
virtual

Definition at line 146 of file ConfigParse.cxx.

◆ printHelpText()

virtual void resip::ConfigParse::printHelpText ( int  argc,
char **  argv 
)
pure virtual

◆ removePath()

resip::Data resip::ConfigParse::removePath ( const resip::Data &  fileAndPath) const
protected

Definition at line 494 of file ConfigParse.cxx.

◆ translateConfigValue()

template<typename T >
bool resip::ConfigParse::translateConfigValue ( const std::map< T, resip::Data >  dict,
const resip::Data &  name,
T &  value 
) const
inlineprotected

Definition at line 72 of file ConfigParse.hxx.

Friends And Related Symbol Documentation

◆ operator<<

EncodeStream & operator<< ( EncodeStream &  strm,
const ConfigParse &  config 
)
friend

Definition at line 526 of file ConfigParse.cxx.

Member Data Documentation

◆ mCmdLineConfigFilename

resip::Data resip::ConfigParse::mCmdLineConfigFilename
protected

Definition at line 103 of file ConfigParse.hxx.

◆ mCmdLineConfigValues

ConfigValuesMap resip::ConfigParse::mCmdLineConfigValues
protected

Definition at line 96 of file ConfigParse.hxx.

◆ mConfigBasePath

resip::Data resip::ConfigParse::mConfigBasePath
protected

Definition at line 105 of file ConfigParse.hxx.

◆ mConfigValues

ConfigValuesMap resip::ConfigParse::mConfigValues
protected

Definition at line 98 of file ConfigParse.hxx.

◆ mFileConfigValues

ConfigValuesMap resip::ConfigParse::mFileConfigValues
protected

Definition at line 97 of file ConfigParse.hxx.


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