Go to the source code of this file.
Namespaces | |
| namespace | mstring |
Classes | |
| struct | mstring::MBoolStrings |
| Contains localized strings for the conversion of bool values. More... | |
| struct | mstring::MTimeStrings |
| Contains localized format strings for the conversion of time values. More... | |
| class | mstring::MString |
| A string class. More... | |
| class | mstring::MStringList |
| An ordered list of MStrings. More... | |
Defines | |
| #define | DLLEXPORT |
| Declare namespace members for export from shared libraries. | |
| #define | MSTRING_LOCALE 1 |
| En-/disables the setting of the locale environment. | |
| #define | foreach(VARIABLE, ITERATOR, STLCONTAINER) |
| A simple foreach macro for STL containers. | |
Typedefs | |
| typedef unsigned int | mstring::uint |
| typedef unsigned long | mstring::ulong |
Enumerations | |
| enum | mstring::NumericBase { mstring::Bin = 2, mstring::Oct = 8, mstring::Dec = 10, mstring::Hex = 16 } |
| Available numeric bases for the conversion of integer values. More... | |
| enum | mstring::NumericFormat { mstring::DefaultFormat = 0x00, mstring::AlignSign = 0x01, mstring::ShowPlus = 0x02, mstring::ShowBase = 0x04 } |
| Format flags for the conversion of numeric values to strings. More... | |
| enum | mstring::TimeFormat { mstring::Date, mstring::Time, mstring::Date_Time } |
| Available formats for the conversion of time values. More... | |
Functions | |
| DLLEXPORT const MString | mstring::operator+ (const char *str, const MString &ms) |
| DLLEXPORT std::ostream & | mstring::operator<< (std::ostream &stream, const MString &ms) |
| DLLEXPORT std::istream & | mstring::operator>> (std::istream &stream, MString &ms) |
| DLLEXPORT std::ostream & | mstring::operator<< (std::ostream &stream, const MStringList &msl) |
| #define DLLEXPORT |
This macro can be used to declare all namespace members for export from a shared library (DLL on Windows). It defaults to an empty string (nothing is exported).
This will not be defined when there's already a preprocessor definition with this name.
| #define MSTRING_LOCALE 1 |
MSTRING_LOCALE == 1 (the default) enables the locale environment LC_CTYPE being set to the current locale setting as provided by the system on creating the first MString object. Setting it to 0 will cause accent characters not being handled correctly in case conversions and sorting.
The functionality of mstring::MString::setNumLocale() and mstring::MString::setTimeLocale() are not affected by this.
| #define foreach | ( | VARIABLE, | |||
| ITERATOR, | |||||
| STLCONTAINER | ) |
Value:
for(ITERATOR = STLCONTAINER.begin(); \ (ITERATOR != STLCONTAINER.end()) && ((VARIABLE = *ITERATOR) || true); \ ITERATOR++)
All arguments have to be instantiated before invoking foreach(). The arguments must be variables, not function calls. Example:
MString s;
MStringList::const_iterator i;
MStringList l = ...
foreach(s, i, l)
{
//Do something with s
}
The macro will not be defined if there's already a preprocessor definition with the same name.
1.5.2