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

Structure to hold table of characters that should be replaced or deleted. More...

#include <logging_api.hpp>

Public Types

enum  { MAX_REPLACEMENT_LENGTH = 3 }
 

Public Member Functions

void initEscapes (const char *quoteTheseChars, const char *escapeUsing, const char *convertNULL) OME_ALWAYS_INLINE
 Initialize escape table. More...
 
 Escaped_Replacement_Characters (bool doNothing)
 Constructor that does no preparation. More...
 
 Escaped_Replacement_Characters (const char *quoteTheseChars=_DEFAULT_ESCAPED_CHARACTERS, const char *escapeUsing=_DEFAULT_REPLACEMENT_CHARACTERS, const char *convertNULL=_DEFAULT_NULL_REPLACEMENT) OME_ALWAYS_INLINE
 Constructor that dynamically prepares content. More...
 

Public Attributes

int8_t escapedLen [256]
 
char escapedChar [256][MAX_REPLACEMENT_LENGTH+1]
 

Detailed Description

Structure to hold table of characters that should be replaced 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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_REPLACEMENT_LENGTH 

Constructor & Destructor Documentation

◆ Escaped_Replacement_Characters() [1/2]

Escaped_Replacement_Characters::Escaped_Replacement_Characters ( bool  doNothing)
inlineexplicit

Constructor that does no preparation.

None of the arrays will be initialized with content.

If intended to be used, the arrays should be populated via a subsequent call to initEscapes().

◆ Escaped_Replacement_Characters() [2/2]

Escaped_Replacement_Characters::Escaped_Replacement_Characters ( const char *  quoteTheseChars = _DEFAULT_ESCAPED_CHARACTERS,
const char *  escapeUsing = _DEFAULT_REPLACEMENT_CHARACTERS,
const char *  convertNULL = _DEFAULT_NULL_REPLACEMENT 
)
inlineexplicit

Constructor that dynamically prepares content.

Parameters
quoteTheseCharsspecifies the characters to be quoted.
escapeUsingspecifies the replacement pattern.
convertNULLspecifies the replacement for a null character.

References initEscapes().

Member Function Documentation

◆ initEscapes()

void Escaped_Replacement_Characters::initEscapes ( const char *  quoteTheseChars,
const char *  escapeUsing,
const char *  convertNULL 
)
inline

Initialize escape table.

Parameters
quoteTheseCharsspecifies the set of non-null characters to be modified or replaced.
escapeUsingspecifies the a null-separated group of replacement characters for each corresponding character in quoteTheseChars. If the group is empty, the character is deleted.
convertNULLspecifies the treatment of the null character.

NOTE: currently, a maximum of 3 characters can be replaced for a given character.

References escapedChar, escapedLen, and OME_PREFETCH.

Referenced by Escaped_Replacement_Characters().

Member Data Documentation

◆ escapedChar

char Escaped_Replacement_Characters::escapedChar[256][MAX_REPLACEMENT_LENGTH+1]

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

◆ escapedLen

int8_t Escaped_Replacement_Characters::escapedLen[256]

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


The documentation for this class was generated from the following file:
Generated: Tue Jul 28 2020 16:03:27
Support Information