#include <parameter.h>
Public Member Functions | |
ParameterIdentificator (const wxChar *pool=wxT("*"), const wxChar *param=wxT("*"), const wxChar *inst=wxT("*"), const wxChar *_description=wxT("")) | |
Constructor. | |
ParameterIdentificator (const wxString &pool, const wxString ¶m, const MODULE_ID moduleID, const wxString &_description=wxT("")) | |
Constructor - from module. | |
ParameterIdentificator (const ParameterIdentificator &pi) | |
Copy constructor. | |
bool | operator== (const ParameterIdentificator &pi) const |
Comparison. | |
bool | operator!= (const ParameterIdentificator &pi) const |
Comparison. | |
bool | Matches (const ParameterIdentificator &maskPi) const |
Comparison. | |
bool | IsValid () const |
Check if valid - poolName and paramName must be defined without any '*' or '?'. | |
wxString | ToString () const |
Get full parameter name in 'pool.param.inst' format. | |
ParameterIdentificator * | Clone () const |
Get deep copy. | |
Static Public Member Functions | |
static ParameterIdentificator | FromParamName (const wxString &fullName) |
static ParameterIdentificator | FromEvent (const wxCommandEvent &setParamEvent) |
Create from EVT_PARAM_SET event. | |
Public Attributes | |
wxString | poolName |
Pool identificator. | |
wxString | paramName |
Parameter identificator. | |
wxString | instName |
Pool instance identificator. | |
wxString | description |
parameter description (short help, used also for ToolTip in GUI) |
Definition at line 30 of file parameter.h.
VRUT::Parameter::ParameterIdentificator::ParameterIdentificator | ( | const wxChar * | pool = wxT("*") , |
|
const wxChar * | param = wxT("*") , |
|||
const wxChar * | inst = wxT("*") , |
|||
const wxChar * | _description = wxT("") | |||
) | [inline] |
Constructor.
Definition at line 42 of file parameter.h.
00046 : poolName(pool), paramName(param), instName(inst), description(_description) {}
VRUT::Parameter::ParameterIdentificator::ParameterIdentificator | ( | const wxString & | pool, | |
const wxString & | param, | |||
const MODULE_ID | moduleID, | |||
const wxString & | _description = wxT("") | |||
) | [inline] |
Constructor - from module.
Definition at line 48 of file parameter.h.
00049 : poolName(pool), paramName(param), instName(wxString::Format(wxT("%i"), moduleID.GetInstanceID())), description(_description) {}
VRUT::Parameter::ParameterIdentificator::ParameterIdentificator | ( | const ParameterIdentificator & | pi | ) | [inline] |
Copy constructor.
Definition at line 51 of file parameter.h.
00052 : poolName(CloneWxString(pi.poolName)), paramName(CloneWxString(pi.paramName)), instName(CloneWxString(pi.instName)), description(CloneWxString(pi.description)) {}
bool VRUT::Parameter::ParameterIdentificator::operator== | ( | const ParameterIdentificator & | pi | ) | const [inline] |
Comparison.
Definition at line 55 of file parameter.h.
00056 { 00057 return pi.poolName.IsSameAs(poolName) && pi.paramName.IsSameAs(paramName) && pi.instName.IsSameAs(instName); 00058 }
bool VRUT::Parameter::ParameterIdentificator::operator!= | ( | const ParameterIdentificator & | pi | ) | const [inline] |
Comparison.
Definition at line 60 of file parameter.h.
00061 { 00062 return !operator==(pi); 00063 }
bool VRUT::Parameter::ParameterIdentificator::Matches | ( | const ParameterIdentificator & | maskPi | ) | const [inline] |
Comparison.
Definition at line 65 of file parameter.h.
00066 { 00067 return poolName.Matches(maskPi.poolName) && paramName.Matches(maskPi.paramName) && instName.Matches(maskPi.instName); 00068 }
bool VRUT::Parameter::ParameterIdentificator::IsValid | ( | ) | const [inline] |
Check if valid - poolName
and paramName
must be defined without any '*' or '?'.
Definition at line 70 of file parameter.h.
00071 { 00072 return !poolName.IsEmpty() 00073 && !paramName.IsEmpty() 00074 && (poolName.Find('*') == wxNOT_FOUND) 00075 && (poolName.Find('?') == wxNOT_FOUND) 00076 && (paramName.Find('*') == wxNOT_FOUND) 00077 && (paramName.Find('?') == wxNOT_FOUND); 00078 }
static ParameterIdentificator VRUT::Parameter::ParameterIdentificator::FromParamName | ( | const wxString & | fullName | ) | [inline, static] |
Create from full param name format 'pool.param[.inst]' Should be checked if valid afterwards
Definition at line 81 of file parameter.h.
00082 { 00083 TextParser textParser(fullName); 00084 ParameterIdentificator pi; 00085 if (!textParser.IsEmpty()) 00086 pi.poolName = textParser.GetWxString("."); 00087 if (!textParser.IsEmpty()) 00088 pi.paramName = textParser.GetWxString("."); 00089 if (!textParser.IsEmpty()) 00090 pi.instName = textParser.GetWxString(". \t\n\r"); 00091 return pi; 00092 }
static ParameterIdentificator VRUT::Parameter::ParameterIdentificator::FromEvent | ( | const wxCommandEvent & | setParamEvent | ) | [inline, static] |
Create from EVT_PARAM_SET
event.
Definition at line 94 of file parameter.h.
00095 { 00096 return Parameter::ParameterIdentificator::FromParamName(((wxString *)setParamEvent.GetClientData())->BeforeFirst('=')); 00097 }
wxString VRUT::Parameter::ParameterIdentificator::ToString | ( | ) | const [inline] |
Get full parameter name in 'pool.param.inst' format.
Definition at line 99 of file parameter.h.
00100 { 00101 return wxString::Format(wxT("%s.%s.%s"), poolName.c_str(), paramName.c_str(), instName.c_str()); 00102 }
ParameterIdentificator* VRUT::Parameter::ParameterIdentificator::Clone | ( | ) | const [inline] |
Get deep copy.
Definition at line 104 of file parameter.h.
00105 { 00106 return new ParameterIdentificator(*this); 00107 }
parameter description (short help, used also for ToolTip in GUI)
Definition at line 39 of file parameter.h.