FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
EscapedTextBlock_struct Class Reference

Placeholder structure to reference a text fragment that will have selected characters transformed or deleted. More...

#include <logging_api.hpp>

Public Member Functions

 EscapedTextBlock_struct (const char *bfr, const char *quoteTheseChars, const char *escapeUsing=_DEFAULT_REPLACEMENT_CHARACTERS, const char *convertNULL=_DEFAULT_NULL_REPLACEMENT) OME_ALWAYS_INLINE
 Escape string, determine string length. More...
 
 EscapedTextBlock_struct (const char *bfr, const Escaped_Replacement_Characters &useReplacements=defaultEscapePatterns) OME_ALWAYS_INLINE
 Escape string, determine string length. More...
 
 EscapedTextBlock_struct (const char *bfr, uint_fast32_t len, const char *quoteTheseChars, const char *escapeUsing=_DEFAULT_REPLACEMENT_CHARACTERS, const char *convertNULL=_DEFAULT_NULL_REPLACEMENT) OME_ALWAYS_INLINE
 Escape string of known length. More...
 
 EscapedTextBlock_struct (const char *bfr, uint_fast32_t len, const Escaped_Replacement_Characters &useReplacements=defaultEscapePatterns) OME_ALWAYS_INLINE
 Escape string of known length with precomputed escapes. More...
 
 EscapedTextBlock_struct (const std::string &bfr, const char *quoteTheseChars, const char *escapeUsing=_DEFAULT_REPLACEMENT_CHARACTERS, const char *convertNULL=_DEFAULT_NULL_REPLACEMENT) OME_ALWAYS_INLINE
 Escape std::string. More...
 
 EscapedTextBlock_struct (const std::string &bfr, const Escaped_Replacement_Characters &useReplacements=defaultEscapePatterns) OME_ALWAYS_INLINE
 Escape std::string. More...
 
 EscapedTextBlock_struct (const char justThisChar, const char *quoteTheseChars, const char *escapeUsing=_DEFAULT_REPLACEMENT_CHARACTERS, const char *convertNULL=_DEFAULT_NULL_REPLACEMENT) OME_ALWAYS_INLINE
 Escape a single character. More...
 
 EscapedTextBlock_struct (const char justThisChar, const Escaped_Replacement_Characters &useReplacements=defaultEscapePatterns) OME_ALWAYS_INLINE
 

Public Attributes

const char * textBfr
 points at text to be processed More...
 
uint_fast32_t bfrLen
 specifies length of text string More...
 
char singleOutputChar
 storage for single character More...
 
const Escaped_Replacement_CharactersreplacementsToUse
 effective replacement characters More...
 
Escaped_Replacement_Characters dynamicReplacements
 storage for dynamically assigned replacements More...
 

Static Public Attributes

static Escaped_Replacement_Characters defaultEscapePatterns
 Pre-generated default escape patterns. More...
 

Detailed Description

Placeholder structure to reference a text fragment that will have selected characters transformed or deleted.

By default, characters are left as-is. The set of non-null characters to be modified or deleted is specified in one set; the replacement for null is specified separately. The replacement characters are specified as a null-separated groups of characters.

The constructors take a pointer to a text string with an optional length or character. By default, they use a precomputed Escaped_Replacement_Characters block, but an alternate replacement can be explicit specified or a dynamic one will be populated if the replacement strings are also provided.

Constructor & Destructor Documentation

◆ EscapedTextBlock_struct() [1/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char *  bfr,
const char *  quoteTheseChars,
const char *  escapeUsing = _DEFAULT_REPLACEMENT_CHARACTERS,
const char *  convertNULL = _DEFAULT_NULL_REPLACEMENT 
)
inlineexplicit

Escape string, determine string length.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [2/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char *  bfr,
const Escaped_Replacement_Characters useReplacements = defaultEscapePatterns 
)
inlineexplicit

Escape string, determine string length.

NOTE: this routine implements the default scenario where only a const char pointer is provided.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [3/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char *  bfr,
uint_fast32_t  len,
const char *  quoteTheseChars,
const char *  escapeUsing = _DEFAULT_REPLACEMENT_CHARACTERS,
const char *  convertNULL = _DEFAULT_NULL_REPLACEMENT 
)
inline

Escape string of known length.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [4/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char *  bfr,
uint_fast32_t  len,
const Escaped_Replacement_Characters useReplacements = defaultEscapePatterns 
)
inline

Escape string of known length with precomputed escapes.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [5/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const std::string &  bfr,
const char *  quoteTheseChars,
const char *  escapeUsing = _DEFAULT_REPLACEMENT_CHARACTERS,
const char *  convertNULL = _DEFAULT_NULL_REPLACEMENT 
)
inlineexplicit

Escape std::string.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [6/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const std::string &  bfr,
const Escaped_Replacement_Characters useReplacements = defaultEscapePatterns 
)
inlineexplicit

Escape std::string.

References bfrLen, and textBfr.

◆ EscapedTextBlock_struct() [7/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char  justThisChar,
const char *  quoteTheseChars,
const char *  escapeUsing = _DEFAULT_REPLACEMENT_CHARACTERS,
const char *  convertNULL = _DEFAULT_NULL_REPLACEMENT 
)
inlineexplicit

Escape a single character.

References bfrLen, singleOutputChar, and textBfr.

◆ EscapedTextBlock_struct() [8/8]

EscapedTextBlock_struct::EscapedTextBlock_struct ( const char  justThisChar,
const Escaped_Replacement_Characters useReplacements = defaultEscapePatterns 
)
inlineexplicit

References bfrLen, singleOutputChar, and textBfr.

Member Data Documentation

◆ bfrLen

uint_fast32_t EscapedTextBlock_struct::bfrLen

specifies length of text string

Referenced by EscapedTextBlock_struct(), and operator<<().

◆ defaultEscapePatterns

Escaped_Replacement_Characters EscapedTextBlock_struct::defaultEscapePatterns
static

Pre-generated default escape patterns.

◆ dynamicReplacements

Escaped_Replacement_Characters EscapedTextBlock_struct::dynamicReplacements

storage for dynamically assigned replacements

◆ replacementsToUse

const Escaped_Replacement_Characters* EscapedTextBlock_struct::replacementsToUse

effective replacement characters

Referenced by operator<<().

◆ singleOutputChar

char EscapedTextBlock_struct::singleOutputChar

storage for single character

Referenced by EscapedTextBlock_struct().

◆ textBfr

const char* EscapedTextBlock_struct::textBfr

points at text to be processed

Referenced by EscapedTextBlock_struct(), and operator<<().


The documentation for this class was generated from the following files:
Generated: Fri Jul 31 2020 18:19:16
Support Information