ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Methods | List of all members
XTernalizer Class Reference

#include <plugins.hpp>

Class Description


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.

Note
Replacing the converters is deemed to be an advanced usage of ALib. Consult the source code for detailed information about how to implement an application specific converter.

This default implementation proceeds as follows:

Definition at line 64 of file config/plugins.hpp.

Public Methods

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)
 

Constructor & Destructor Documentation

◆ ~XTernalizer()

virtual ~XTernalizer ( )
inlinevirtual

Virtual destructor

Definition at line 71 of file config/plugins.hpp.

Member Function Documentation

◆ ExternalizeValue()

void ExternalizeValue ( const String src,
AString dest,
character  delim 
)
virtual

Converts the given src string to an external representation.

Parameters
srcThe source string
destThe destination string
delimIf this character is found in the string, the value is quoted

Definition at line 72 of file plugins.cpp.

Here is the call graph for this function:

◆ InternalizeValue()

void InternalizeValue ( const String src,
AString dest 
)
virtual

Trims src, removes surrounding quotes and , un-escapes characters.

Parameters
srcThe source string
destThe destination string

Definition at line 28 of file plugins.cpp.

Here is the call graph for this function:

◆ LoadFromString()

void LoadFromString ( Variable variable,
const String src 
)
virtual

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.

Parameters
variableThe destination variable.
srcThe source string

Definition at line 108 of file plugins.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: