#include <parameter.h>
Inheritance diagram for Parameter:

Public Types | |
| enum | param_e { FLAG, G_FLAG, STRING, G_STRING, INTEGER, G_INTEGER, DATE, G_DATE } |
Public Methods | |
| Parameter () | |
| virtual std::map< std::string, param_t > & | Param (void) |
| virtual const char * | Prefix (void) const=0 |
| virtual const char * | Name (void) const |
| virtual const char * | Version (void) const |
| virtual const char * | Author (void) const |
| virtual const char * | Help (void) const |
| virtual | ~Parameter () |
Protected Methods | |
| void | addParam (const std::string &prefix, const std::string &info, const std::string &help, const param_e typ, const std::string &value) |
| long | getIntParam (const std::string &prefix) |
| std::string | getStringParam (const std::string &prefix) |
| bool | getFlagParam (const std::string &prefix) |
Protected Attributes | |
| std::map< std::string, param_t > | mapParam |
Private Attributes | |
| const char *const | str_unknown |
| const char *const | str_none |
This is the class on the top of the whole class hierarchy of this project. Every object is inherited by parameter. This class provides a universal interface for commandoline parameters.
|
|
Every Parameter can have one this this four Types. FLAG is a local flag like "--xxx-flagname". The initial value of such local flag should be "0". If the flag is set, the value is set to "1". STRING is a local string like "--xxx-stringname=yyy". If the string is set, the vaule will by yyy in this example. G_FLAG and G_STRING are the global versions of the types above. |
|
|
|
|
|
Virtual deconstructor. |
|
||||||||||||||||||||||||
|
This protected function is normaly used in the Constructor of every parameter object to add all needed parameters. A exception is the Plugin object. In this object a function beforeParam() exist to add new parameters on thy fly. |
|
|
Name of authors of the Object with Email in format "Firstname Lastname <email>" up to 40 chars. Reimplemented in aliasesAddrFilter, analysePlugin, asciiReport, bmAnalyse, filterPlugin, htmlReport, lowercaseAddrFilter, ltAnalyse, ltdAnalyse, mfAnalyse, mrAnalyse, mtAnalyse, reportPlugin, syslogFilter, virtuserAddrFilter, and xtAnalyse. |
|
|
This function is like getIntParam, only with Flags. This function is usable too with STRING parameters. |
|
|
With this function every parameter object can check out a submitted integer parameter. |
|
|
With this function every parameter object can check out a submitted string parameter. |
|
|
A short helptext, or description to this object. Reimplemented in aliasesAddrFilter, analysePlugin, asciiReport, bmAnalyse, filterPlugin, htmlReport, lowercaseAddrFilter, ltAnalyse, ltdAnalyse, mfAnalyse, mrAnalyse, mtAnalyse, reportPlugin, syslogFilter, virtuserAddrFilter, and xtAnalyse. |
|
|
Select a short Name for the parameter Object. Reimplemented in aliasesAddrFilter, analysePlugin, asciiReport, bmAnalyse, filterPlugin, htmlReport, lowercaseAddrFilter, ltAnalyse, ltdAnalyse, mfAnalyse, mrAnalyse, mtAnalyse, reportPlugin, syslogFilter, virtuserAddrFilter, and xtAnalyse. |
|
|
This function passes a reference to the parameter map inside every object. |
|
|
This function returns a unique object prefix. Use only lowercase letters (a-z) and keep this name short as possible. Implemented in aliasesAddrFilter, analysePlugin, asciiReport, bmAnalyse, filterPlugin, htmlReport, lowercaseAddrFilter, ltAnalyse, ltdAnalyse, mfAnalyse, mrAnalyse, mtAnalyse, reportPlugin, syslogFilter, virtuserAddrFilter, and xtAnalyse. |
|
|
Version up to 8 chars in the format V-.- Reimplemented in aliasesAddrFilter, analysePlugin, asciiReport, bmAnalyse, filterPlugin, htmlReport, lowercaseAddrFilter, ltAnalyse, ltdAnalyse, mfAnalyse, mrAnalyse, mtAnalyse, reportPlugin, syslogFilter, virtuserAddrFilter, and xtAnalyse. |
|
|
This is the primary parameter map every object own. The function Param() let everyony access this map for read and write. |
|
|
internal use. |
|
|
internal use. |
1.2.18