PTLib
Version 2.10.4
|
Specialised version of PStringToString to contain a dictionary of options/attributes. More...
#include <pstring.h>
Public Member Functions | |
PStringOptions () | |
PStringOptions (const PStringToString &other) | |
PStringOptions & | operator= (const PStringToString &other) |
bool | Contains (const char *key) const |
Determine if the specified key is present. | |
bool | Contains (const PString &key) const |
bool | Contains (const PCaselessString &key) const |
bool | Contains (const PCaselessString &(*key)()) const |
PString * | GetAt (const char *key) const |
PString * | GetAt (const PString &key) const |
PString * | GetAt (const PCaselessString &key) const |
PString * | GetAt (const PCaselessString &(*key)()) const |
PBoolean | SetAt (const char *key, const PString &data) |
PBoolean | SetAt (const PString &key, const PString &data) |
PBoolean | SetAt (const PCaselessString &key, const PString &data) |
PBoolean | SetAt (const PCaselessString &(*key)(), const PString &data) |
PString * | RemoveAt (const char *key) |
PString * | RemoveAt (const PString &key) |
PString * | RemoveAt (const PCaselessString &key) |
PString * | RemoveAt (const PCaselessString &(*key)()) |
PString | GetString (const char *key, const char *dflt=NULL) const |
Get an option value. | |
PString | GetString (const PString &key, const char *dflt=NULL) const |
PString | GetString (const PCaselessString &key, const char *dflt=NULL) const |
PString | GetString (const PCaselessString &(*key)(), const char *dflt=NULL) const |
bool | SetString (const char *key, const PString &value) |
Set the option value. | |
bool | SetString (const PString &key, const PString &value) |
bool | SetString (const PCaselessString &key, const PString &value) |
bool | SetString (const PCaselessString &(*key)(), const PString &value) |
bool | GetBoolean (const char *key, bool dflt=false) const |
Get the option value as a boolean. | |
bool | GetBoolean (const PString &key, bool dflt=false) const |
bool | GetBoolean (const PCaselessString &key, bool dflt=false) const |
bool | GetBoolean (const PCaselessString &(*key)(), bool dflt=false) const |
void | SetBoolean (const char *key, bool value) |
Set the option value as a boolean. | |
void | SetBoolean (const PString &key, bool value) |
void | SetBoolean (const PCaselessString &key, bool value) |
void | SetBoolean (const PCaselessString &(*key)(), bool value) |
long | GetInteger (const char *key, long dflt=0) const |
Get the option value as an integer. | |
long | GetInteger (const PString &key, long dflt=0) const |
long | GetInteger (const PCaselessString &key, long dflt=0) const |
long | GetInteger (const PCaselessString &(*key)(), long dflt=0) const |
void | SetInteger (const char *key, long value) |
Set an integer value for the particular MIME info field. | |
void | SetInteger (const PString &key, long value) |
void | SetInteger (const PCaselessString &key, long value) |
void | SetInteger (const PCaselessString &(*key)(), long value) |
double | GetReal (const char *key, double dflt=0) const |
Get the option value as a floating point real. | |
double | GetReal (const PString &key, double dflt=0) const |
double | GetReal (const PCaselessString &key, double dflt=0) const |
double | GetReal (const PCaselessString &(*key)(), double dflt=0) const |
void | SetReal (const char *key, double value, int decimals) |
Set a floating point real value for the particular MIME info field. | |
void | SetReal (const PString &key, double value, int decimals) |
void | SetReal (const PCaselessString &key, double value, int decimals) |
void | SetReal (const PCaselessString &(*key)(), double value, int decimals) |
__inline bool | Has (const char *key) const |
Determine of the option exists. | |
__inline bool | Has (const PString &key) const |
__inline bool | Has (const PCaselessString &key) const |
__inline bool | Has (const PCaselessString &(*key)()) const |
__inline PString | Get (const char *key, const char *dflt=NULL) const |
Get the option value. | |
__inline PString | Get (const PString &key, const char *dflt=NULL) const |
__inline PString | Get (const PCaselessString &key, const char *dflt=NULL) const |
__inline PString | Get (const PCaselessString &(*key)(), const char *dflt=NULL) const |
__inline PString | Get (const char *key, const PString &dflt) const |
__inline PString | Get (const PString &key, const PString &dflt) const |
__inline PString | Get (const PCaselessString &key, const PString &dflt) const |
__inline PString | Get (const PCaselessString &(*key)(), const PString &dflt) const |
__inline bool | Set (const char *key, const PString &value) |
Set the option value. | |
__inline bool | Set (const PString &key, const PString &value) |
__inline bool | Set (const PCaselessString &key, const PString &value) |
__inline bool | Set (const PCaselessString &(*key)(), const PString &value) |
__inline void | Remove (const char *key) |
Remove option value. | |
__inline void | Remove (const PString &key) |
__inline void | Remove (const PCaselessString &key) |
__inline void | Remove (const PCaselessString &(*key)()) |
Specialised version of PStringToString to contain a dictionary of options/attributes.
This assures that the keys are caseless and has some access functions for bool/int types for ease of access with default values.
PStringOptions::PStringOptions | ( | ) | [inline] |
PStringOptions::PStringOptions | ( | const PStringToString & | other | ) | [inline] |
bool PStringOptions::Contains | ( | const char * | key | ) | const [inline] |
Determine if the specified key is present.
Referenced by Contains(), and Has().
bool PStringOptions::Contains | ( | const PString & | key | ) | const [inline] |
References Contains().
bool PStringOptions::Contains | ( | const PCaselessString & | key | ) | const [inline] |
References Contains().
bool PStringOptions::Contains | ( | const PCaselessString &(*)() | key | ) | const [inline] |
References Contains().
__inline PString PStringOptions::Get | ( | const char * | key, |
const char * | dflt = NULL |
||
) | const [inline] |
Get the option value.
References GetString().
__inline PString PStringOptions::Get | ( | const PString & | key, |
const char * | dflt = NULL |
||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const PCaselessString & | key, |
const char * | dflt = NULL |
||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const PCaselessString &(*)() | key, |
const char * | dflt = NULL |
||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const char * | key, |
const PString & | dflt | ||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const PString & | key, |
const PString & | dflt | ||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const PCaselessString & | key, |
const PString & | dflt | ||
) | const [inline] |
References GetString().
__inline PString PStringOptions::Get | ( | const PCaselessString &(*)() | key, |
const PString & | dflt | ||
) | const [inline] |
References GetString().
PString* PStringOptions::GetAt | ( | const char * | key | ) | const [inline] |
Referenced by GetAt().
PString* PStringOptions::GetAt | ( | const PString & | key | ) | const [inline] |
References GetAt().
PString* PStringOptions::GetAt | ( | const PCaselessString & | key | ) | const [inline] |
References GetAt().
PString* PStringOptions::GetAt | ( | const PCaselessString &(*)() | key | ) | const [inline] |
References GetAt().
bool PStringOptions::GetBoolean | ( | const char * | key, |
bool | dflt = false |
||
) | const [inline] |
bool PStringOptions::GetBoolean | ( | const PString & | key, |
bool | dflt = false |
||
) | const [inline] |
References GetBoolean().
Referenced by GetBoolean().
bool PStringOptions::GetBoolean | ( | const PCaselessString & | key, |
bool | dflt = false |
||
) | const |
bool PStringOptions::GetBoolean | ( | const PCaselessString &(*)() | key, |
bool | dflt = false |
||
) | const [inline] |
References GetBoolean().
Referenced by GetBoolean().
long PStringOptions::GetInteger | ( | const char * | key, |
long | dflt = 0 |
||
) | const [inline] |
long PStringOptions::GetInteger | ( | const PString & | key, |
long | dflt = 0 |
||
) | const [inline] |
References GetInteger().
Referenced by GetInteger().
long PStringOptions::GetInteger | ( | const PCaselessString & | key, |
long | dflt = 0 |
||
) | const |
long PStringOptions::GetInteger | ( | const PCaselessString &(*)() | key, |
long | dflt = 0 |
||
) | const [inline] |
References GetInteger().
Referenced by GetInteger().
double PStringOptions::GetReal | ( | const char * | key, |
double | dflt = 0 |
||
) | const [inline] |
double PStringOptions::GetReal | ( | const PString & | key, |
double | dflt = 0 |
||
) | const [inline] |
double PStringOptions::GetReal | ( | const PCaselessString & | key, |
double | dflt = 0 |
||
) | const |
double PStringOptions::GetReal | ( | const PCaselessString &(*)() | key, |
double | dflt = 0 |
||
) | const [inline] |
PString PStringOptions::GetString | ( | const char * | key, |
const char * | dflt = NULL |
||
) | const [inline] |
Get an option value.
References GetString().
Referenced by Get(), PMIMEInfo::GetComplex(), and GetString().
PString PStringOptions::GetString | ( | const PString & | key, |
const char * | dflt = NULL |
||
) | const [inline] |
References GetString().
Referenced by GetString().
PString PStringOptions::GetString | ( | const PCaselessString & | key, |
const char * | dflt = NULL |
||
) | const |
PString PStringOptions::GetString | ( | const PCaselessString &(*)() | key, |
const char * | dflt = NULL |
||
) | const [inline] |
References GetString().
Referenced by GetString().
__inline bool PStringOptions::Has | ( | const char * | key | ) | const [inline] |
Determine of the option exists.
References Contains().
__inline bool PStringOptions::Has | ( | const PString & | key | ) | const [inline] |
References Contains().
__inline bool PStringOptions::Has | ( | const PCaselessString & | key | ) | const [inline] |
References Contains().
__inline bool PStringOptions::Has | ( | const PCaselessString &(*)() | key | ) | const [inline] |
References Contains().
PStringOptions& PStringOptions::operator= | ( | const PStringToString & | other | ) | [inline] |
__inline void PStringOptions::Remove | ( | const char * | key | ) | [inline] |
Remove option value.
References RemoveAt().
__inline void PStringOptions::Remove | ( | const PString & | key | ) | [inline] |
References RemoveAt().
__inline void PStringOptions::Remove | ( | const PCaselessString & | key | ) | [inline] |
References RemoveAt().
__inline void PStringOptions::Remove | ( | const PCaselessString &(*)() | key | ) | [inline] |
References RemoveAt().
PString* PStringOptions::RemoveAt | ( | const char * | key | ) | [inline] |
References RemoveAt().
Referenced by Remove(), and RemoveAt().
PString* PStringOptions::RemoveAt | ( | const PString & | key | ) | [inline] |
References RemoveAt().
Referenced by RemoveAt().
PString* PStringOptions::RemoveAt | ( | const PCaselessString & | key | ) | [inline] |
References PContainer::MakeUnique(), and RemoveAt().
PString* PStringOptions::RemoveAt | ( | const PCaselessString &(*)() | key | ) | [inline] |
References RemoveAt().
Referenced by RemoveAt().
__inline bool PStringOptions::Set | ( | const char * | key, |
const PString & | value | ||
) | [inline] |
Set the option value.
References SetAt().
__inline bool PStringOptions::Set | ( | const PString & | key, |
const PString & | value | ||
) | [inline] |
References SetAt().
__inline bool PStringOptions::Set | ( | const PCaselessString & | key, |
const PString & | value | ||
) | [inline] |
References SetAt().
__inline bool PStringOptions::Set | ( | const PCaselessString &(*)() | key, |
const PString & | value | ||
) | [inline] |
References SetAt().
PBoolean PStringOptions::SetAt | ( | const char * | key, |
const PString & | data | ||
) | [inline] |
References SetAt().
Referenced by Set(), SetAt(), SetBoolean(), and SetString().
PBoolean PStringOptions::SetAt | ( | const PString & | key, |
const PString & | data | ||
) | [inline] |
PBoolean PStringOptions::SetAt | ( | const PCaselessString & | key, |
const PString & | data | ||
) | [inline] |
References PContainer::MakeUnique(), and SetAt().
PBoolean PStringOptions::SetAt | ( | const PCaselessString &(*)() | key, |
const PString & | data | ||
) | [inline] |
void PStringOptions::SetBoolean | ( | const char * | key, |
bool | value | ||
) | [inline] |
void PStringOptions::SetBoolean | ( | const PString & | key, |
bool | value | ||
) | [inline] |
References SetBoolean().
Referenced by SetBoolean().
void PStringOptions::SetBoolean | ( | const PCaselessString & | key, |
bool | value | ||
) | [inline] |
References SetAt().
void PStringOptions::SetBoolean | ( | const PCaselessString &(*)() | key, |
bool | value | ||
) | [inline] |
References SetBoolean().
Referenced by SetBoolean().
void PStringOptions::SetInteger | ( | const char * | key, |
long | value | ||
) | [inline] |
Set an integer value for the particular MIME info field.
References SetInteger().
Referenced by SetInteger().
void PStringOptions::SetInteger | ( | const PString & | key, |
long | value | ||
) | [inline] |
References SetInteger().
Referenced by SetInteger().
void PStringOptions::SetInteger | ( | const PCaselessString & | key, |
long | value | ||
) |
void PStringOptions::SetInteger | ( | const PCaselessString &(*)() | key, |
long | value | ||
) | [inline] |
References SetInteger().
Referenced by SetInteger().
void PStringOptions::SetReal | ( | const char * | key, |
double | value, | ||
int | decimals | ||
) | [inline] |
void PStringOptions::SetReal | ( | const PString & | key, |
double | value, | ||
int | decimals | ||
) | [inline] |
void PStringOptions::SetReal | ( | const PCaselessString & | key, |
double | value, | ||
int | decimals | ||
) |
void PStringOptions::SetReal | ( | const PCaselessString &(*)() | key, |
double | value, | ||
int | decimals | ||
) | [inline] |
bool PStringOptions::SetString | ( | const char * | key, |
const PString & | value | ||
) | [inline] |
Set the option value.
References SetAt().
bool PStringOptions::SetString | ( | const PString & | key, |
const PString & | value | ||
) | [inline] |
References SetAt().
bool PStringOptions::SetString | ( | const PCaselessString & | key, |
const PString & | value | ||
) | [inline] |
References SetAt().
bool PStringOptions::SetString | ( | const PCaselessString &(*)() | key, |
const PString & | value | ||
) | [inline] |
References SetAt().