ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
StringEscaper Struct Reference

Description:

This is a virtual base type defining the interface for derived struct StringEscaperStandard and possible custom derivates.
However, this class is not abstract but instead implements the interface by just copying the strings to the given target buffers. The rationale for this is that it can be used in situations, where no externalization and import of externalized strings are needed. In other words: In situations where a function expects a StringEscaper where none is necessary a local instance of this type can be created and just passed.

See also
Any further explanation is found with the documentation of derived type StringEscaperStandard.

Definition at line 29 of file escaper.hpp.

#include <escaper.hpp>

Inheritance diagram for StringEscaper:
[legend]

Public Method Index:

virtual ~StringEscaper ()
 Virtual destructor.
 
virtual AStringEscape (const String &src, AString &dest, const String &delimiters) const
 
virtual ALIB_API int EscapeTokens (StringVectorMA &result, const String &src, const String &delimiters) const
 
virtual AStringUnescape (const String &src, AString &dest) const
 
virtual int UnescapeTokens (StringVectorMA &result, const String &src, const String &delimiters) const
 

Constructor(s) / Destructor Details:

◆ ~StringEscaper()

virtual ~StringEscaper ( )
inlinevirtual

Virtual destructor.

Definition at line 32 of file escaper.hpp.

Method Details:

◆ Escape()

virtual AString & Escape ( const String & src,
AString & dest,
const String & delimiters ) const
inlinevirtual

Just copies the given src string to dest.

Parameters
srcThe source string.
destThe destination string.
delimitersIgnored
Returns
dest to allow concatenated operations.

Reimplemented in StringEscaperStandard.

Definition at line 43 of file escaper.hpp.

◆ EscapeTokens()

int EscapeTokens ( StringVectorMA & result,
const String & src,
const String & delimiters ) const
virtual

Simply tokenizes src and feeds the tokens into result.

Availability
This method is defined only if module ALib Monomem is included in the ALib Distribution.
Parameters
resultThe destination list of strings.
srcThe source string.
delimitersA set of characters accepted as delimiters.
Returns
The number of tokens found.

Reimplemented in StringEscaperStandard.

Definition at line 20 of file escaper.cpp.

Here is the call graph for this function:

◆ Unescape()

virtual AString & Unescape ( const String & src,
AString & dest ) const
inlinevirtual

Just copies the given src string to dest.

Parameters
srcThe source string.
destThe destination string.
Returns
dest to allow concatenated operations.

Reimplemented in StringEscaperStandard.

Definition at line 54 of file escaper.hpp.

◆ UnescapeTokens()

virtual int UnescapeTokens ( StringVectorMA & result,
const String & src,
const String & delimiters ) const
inlinevirtual

Simply tokenizes src and feeds the tokens into result. (In fact, EscapeTokens is called.)

Availability
This method is defined only if module ALib Monomem is included in the ALib Distribution.
Parameters
resultThe destination list of strings.
srcThe source string.
delimitersA set of characters accepted as delimiters.
Returns
The number of tokens found.

Reimplemented in StringEscaperStandard.

Definition at line 83 of file escaper.hpp.

Here is the call graph for this function:

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