#include <MboStrMap.h>
Public Member Functions | |
virtual | ~CStrMapStr () |
CStrMapStr () | |
CStrMapStr (const MboString &strList) | |
MboString | ToCStr (size_t nMaxKeyLength=0, const MboString &strKeyMore="", const MboString &strSplit=",", const MboString &strSeparate="=", const MboString &strKeyAppend="") const |
void | Scan (const MboString &strList) |
This is based on CStrMap<> and therefor uses case insensitive keys. The elements are of corse case sensitive. If you need to change this behaviour you need to create another class from this template which uses another prediction (template parameter CStrMap::__Pr).
SUPPORT_IOSTREAM
. Definition at line 112 of file MboStrMap.h.
virtual mbo::CStrMapStr::~CStrMapStr | ( | ) | [inline, virtual] |
mbo::CStrMapStr::CStrMapStr | ( | ) |
default constructor to create an empty map
mbo::CStrMapStr::CStrMapStr | ( | const MboString & | strList | ) |
Creates a CStrMapStr from a comma separated list of entries. See Scan() for details
strList | comma separated list |
MboString mbo::CStrMapStr::ToCStr | ( | size_t | nMaxKeyLength = 0 , |
|
const MboString & | strKeyMore = "" , |
|||
const MboString & | strSplit = "," , |
|||
const MboString & | strSeparate = "=" , |
|||
const MboString & | strKeyAppend = "" | |||
) | const |
Make flat string from map with each key having a maximum length specified by nMaxKeylength.
<key1> "=" <value1> "," <key2> "=" <value2>, ...
nMaxKeyLength | maximum length of key names (0 means whole keys, -1 means no key). | |
strKeyMore | if the Key has to be cut due to the maximum length specified you can indicate this by overriding the end of the key string with this value (see CStr::LeftString). | |
strSplit | you can change the split string from "," to whatever string you like (for example "\n"). | |
strSeparate | you can also change the separation string from "=" to meet your needs (for example "\t= "). | |
strKeyAppend | it is also possible to append a string to the key before it is being cut using CStr::LeftString. |
strSplit
= "\n": <key1> "=" <value1> <key2> "=" <value2>
str.ToCStr(8, ".", "\n", "= ", "\t")
void mbo::CStrMapStr::Scan | ( | const MboString & | strList | ) |
Scan a comma separated list of entries. The list will not be cleared before reading.
<key1> "=" <value1> "," <key2> "=" <value2>, ...
Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:12 2008 for MBO-lib by ![]() |