Crypto++
7.0
Free C++ class library of cryptographic schemes
|
Interface for retrieving values given their names. More...
Public Member Functions | |
bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const |
Get a named value. More... | |
![]() | |
template<class T > | |
bool | GetThisObject (T &object) const |
Get a copy of this object or subobject. More... | |
template<class T > | |
bool | GetThisPointer (T *&ptr) const |
Get a pointer to this object. More... | |
template<class T > | |
bool | GetValue (const char *name, T &value) const |
Get a named value. More... | |
template<class T > | |
T | GetValueWithDefault (const char *name, T defaultValue) const |
Get a named value. More... | |
std::string | GetValueNames () const |
Get a list of value names that can be retrieved. More... | |
bool | GetIntValue (const char *name, int &value) const |
Get a named value with type int. More... | |
int | GetIntValueWithDefault (const char *name, int defaultValue) const |
Get a named value with type int, with default. More... | |
template<class T > | |
void | GetRequiredParameter (const char *className, const char *name, T &value) const |
Retrieves a required name/value pair. More... | |
void | GetRequiredIntParameter (const char *className, const char *name, int &value) const |
Retrieves a required name/value pair. More... | |
Additional Inherited Members | |
![]() | |
static void | ThrowIfTypeMismatch (const char *name, const std::type_info &stored, const std::type_info &retrieving) |
Ensures an expected name and type is present. More... | |
Interface for retrieving values given their names.
This class is used when no names or values are present. Typically a program uses g_nullNameValuePairs rather than creating its own NullNameValuePairs object.
NullNameValuePairs always existed in cryptlib.cpp. Crypto++ 6.0 moved NullNameValuePairs into the header. This allowed the library to define g_nullNameValuePairs in the header rather than declaring it as extern and placing the definition in the source file. As an external definition the string g_nullNameValuePairs was subject to static initialization order fiasco problems.
Definition at line 461 of file cryptlib.h.
|
inlinevirtual |
Get a named value.
name | the name of the object or value to retrieve |
valueType | reference to a variable that receives the value |
pValue | void pointer to a variable that receives the value |
GetVoidValue() retrieves the value of name if it exists.
Implements NameValuePairs.
Definition at line 465 of file cryptlib.h.