WxCrypt provides a container to store/retrive name-value pairs.
The names are of type std::string while the associated values can be of arbitrary types supporting the copy constructor. Note that for efficiency reasons WxCrypt should be used to store only "light-weight" objects like native-type objects (int, double, string etc.) or small objects which are not expensive to copy.
WxCrypt objects are immutable: values once added can not be removed or modifed.
|
| WxCrypt () |
|
virtual | ~WxCrypt () |
|
| WxCrypt (const WxCrypt &crypt) |
| Copy ctor: make a deep copy of 'crypt'.
|
|
WxCrypt & | operator= (const WxCrypt &rhs) |
| Assignment operator: LHS is a deep copy of 'rhs'.
|
|
template<typename VALUETYPE > |
bool | add (const std::string &name, const VALUETYPE &value) |
| Insert a name, value pair.
|
|
bool | has (const std::string &name) const |
| Returns true if the 'name' exists in the crypt.
|
|
template<typename VALUETYPE > |
VALUETYPE | get (const std::string &name) const |
| Retrieve the value associated with name.
|
|
template<typename VALUETYPE > |
VALUETYPE | getWithDefault (const std::string &name, const VALUETYPE defaultValue) const |
| Retrieve the value associated with name, or the given default value if no such key is in the cryptset.
|
|
const WxAny & | get (const std::string &name) const |
| Gets the raw WxAny value associated with name.
|
|
WxAny & | get (const std::string &name) |
| Gets the raw WxAny value associated with name.
|
|
void | set (const std::string &name, const WxAny &val) |
| Ensures a value with name is this wxcrypt, either by adding it or changing the existing map.
|
|
void | set (const std::string &name, WxAny &&val) |
| Ensures a value with name is this wxcrypt, either by adding it or changing the existing map.
|
|
template<class T > |
void | set (const std::string &name, T val) |
|
template<typename VALUETYPE > |
std::vector< VALUETYPE > | getVec (const std::string &name) const |
| Retrieve list of values associated with name.
|
|