This virtual class is used by classes derived from ConfigurationPlugin to convert external string to internal values and vice versa, and for parsing lists of values from an external string.
Class ConfigurationPlugin owns a default object with field defaultStringConverter which by default points to field StringConverter .
This default implementation proceeds as follows:
'\'
. Those are \n
, \r
, \t
, \a
, \b
, \v
, \f
, \e
and also the double quotation marks \" and the backslash itself (\c \\\\).
- "Internalizing" a value:
- If (non-escaped) quote \c "
characters are found, those are removed and whitespaces within such quotes are kept.Definition at line 64 of file config/plugins.hpp.
#include <plugins.hpp>
Public Method Index: | |
virtual | ~XTernalizer () |
virtual ALIB_API void | ExternalizeValue (const String &src, AString &dest, character delim) |
virtual ALIB_API void | InternalizeValue (const String &src, AString &dest) |
virtual ALIB_API void | LoadFromString (Variable &variable, const String &src) |
|
inlinevirtual |
Converts the given src string to an external representation.
src | The source string |
dest | The destination string |
delim | If this character is found in the string, the value is quoted |
Definition at line 76 of file plugins.cpp.
Trims src , removes surrounding quotes and , un-escapes characters.
src | The source string |
dest | The destination string |
Definition at line 32 of file plugins.cpp.
If field Variable::Delim is '\0'
, just invokes InternalizeValue. Otherwise, parses values using the delimiter. Quotes are removed and parts within quotes are kept as is. Also, delimiters in quotes are ignored.
variable | The destination variable. |
src | The source string |
Definition at line 112 of file plugins.cpp.