ALox  V. 2402 R. 0
Home ALox for C++ ALox for C# ALox for Java Download
Public Methods | Protected Fields | List of all members
XTernalizer Class Reference
Collaboration diagram for XTernalizer:
[legend]

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:

Public Methods

virtual void ExternalizeValue (Object src, AString dest, char delim)
 
virtual void InternalizeValue (Substring src, AString dest)
 
virtual void LoadFromString (Variable variable, Object src)
 

Protected Fields

AString tmpAS = new AString()
 
Substring tmpSubs = new Substring()
 
Substring tmpSubs2 = new Substring()
 

Member Function Documentation

◆ ExternalizeValue()

virtual void ExternalizeValue ( Object  src,
AString  dest,
char  delim 
)
inlinevirtual

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

◆ InternalizeValue()

virtual void InternalizeValue ( Substring  src,
AString  dest 
)
inlinevirtual

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

Parameters
srcThe source string
destThe destination string

◆ LoadFromString()

virtual void LoadFromString ( Variable  variable,
Object  src 
)
inlinevirtual

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

Member Data Documentation

◆ tmpAS

AString tmpAS = new AString()
protected

a reusable AString

◆ tmpSubs

Substring tmpSubs = new Substring()
protected

a reusable Substring

◆ tmpSubs2

Substring tmpSubs2 = new Substring()
protected

a reusable Substring


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