FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEstring Class Referencefinal

Implements text and binary string storage. More...

#include <OMEstring.h>

+ Inheritance diagram for OMEstring:

Public Member Functions

 OMEstring ()
 
 OMEstring (const OMEstring &org)
 
 OMEstring (const char *s, uint_fast8_t impliedCharSet=OME_DEFAULT_CHARSET)
 
 OMEstring (const unsigned char *s, ssize_t l=-1, uint_fast8_t impliedCharSet=OME_CHARSET_UNDEFINED)
 
 OMEstring (OMEstringInROM s, ssize_t l=-1, uint_fast8_t impliedCharSet=OME_DEFAULT_CHARSET)
 
 OMEstring (size_t l, uint_fast8_t impliedCharSet=OME_CHARSET_UNDEFINED)
 
OMEstringoperator= (const OMEstring &arg)
 
 ~OMEstring ()
 
OMEstringdeepCopy () const
 
OMEstringoperator= (const char *s)
 
OMEstringoperator= (const unsigned char *s)
 
void noteCharacterSet (uint_fast8_t c)
 
void determineCharacterSet ()
 
uint_fast8_t getCharacterSet () const
 
size_t length () const
 
 operator const char * () const
 
 operator const unsigned char * () const
 
OMEstringprintableCopy () const
 
bool operator== (const OMEstring &arg) const
 
bool operator!= (const OMEstring &arg) const
 
bool operator< (const OMEstring &arg) const OME_ALWAYS_INLINE
 
bool operator> (const OMEstring &arg) const OME_ALWAYS_INLINE
 
bool operator<= (const OMEstring &arg) const OME_ALWAYS_INLINE
 
bool operator>= (const OMEstring &arg) const OME_ALWAYS_INLINE
 
bool operator== (const char *arg) const OME_ALWAYS_INLINE
 
bool operator!= (const char *arg) const OME_ALWAYS_INLINE
 
bool operator== (const unsigned char *arg) const OME_ALWAYS_INLINE
 
bool operator!= (const unsigned char *arg) const OME_ALWAYS_INLINE
 
OMEstringoperator+ (const OMEstring &rop) const
 
OMEstringoperator+= (const OMEstring &rop)
 
ssize_t substr (const OMEstring &sub, size_t startOffset=0) const
 
ssize_t lastSubstr (const OMEstring &sub, size_t startOffset=~static_cast< size_t >(0)) const
 
ssize_t substr (const unsigned char *sub, size_t len=~static_cast< size_t >(0), size_t startOffset=0) const
 
ssize_t substr (const char *sub, size_t len=~static_cast< size_t >(0), size_t startOffset=0) const
 
ssize_t lastSubstr (const unsigned char *sub, size_t len=~static_cast< size_t >(0), size_t startOffset=~static_cast< size_t >(0)) const
 
unsigned char midchar (size_t offset) const
 
OMEstringmidstr (size_t offset, size_t len) const
 
OMEstringreverse () const
 
void truncateToLength (size_t newLen)
 
template<typename STREAMTYPE >
STREAMTYPE & outputOnStream (STREAMTYPE &outputStream, int_fast16_t indent=0, uint8_t includeTypePrefix=0) const
 Output an OMEstring to an output stream. More...
 
template<typename STREAMTYPE >
STREAMTYPE & outputOnStreamAsHex (STREAMTYPE &outputStream, int_fast16_t indent=0, bool dense=false) const
 Output the contents of an OMEstring object to an output stream as a collection of hexadecimal characters. More...
 
- Public Member Functions inherited from OMEreferenceToData< OMEstringStorage >
void getUniqueReference ()
 Force unique reference to the data, which will trigger duplication if necessary (copy-on-write). More...
 
int_fast32_t totalReferences () const OME_ALWAYS_INLINE
 Get current reference total. More...
 

Static Public Attributes

static const OMEstring nullOMEstring
 

Private Member Functions

 OMEstring (OMEstringStorage *s)
 

Friends

class OMEstringStorage
 

Additional Inherited Members

- Protected Member Functions inherited from OMEreferenceToData< OMEstringStorage >
void addReadOnlyReference () OME_ALWAYS_INLINE
 
void dropReference (OMEstringStorage *newData=nullptr) OME_ALWAYS_INLINE
 
 OMEreferenceToData ()
 
 OMEreferenceToData (OMEstringStorage *existingData) NONNULL_CLASS_PARAMETERS(2)
 
 OMEreferenceToData (const OMEreferenceToData< OMEstringStorage > &org)
 
virtual ~OMEreferenceToData ()
 
- Protected Attributes inherited from OMEreferenceToData< OMEstringStorage >
OMEstringStoragedata
 

Detailed Description

Implements text and binary string storage.

Note
Copy-on-write implementation.

Constructor & Destructor Documentation

◆ OMEstring() [1/7]

OMEstring::OMEstring ( OMEstringStorage s)
inlineexplicitprivate

References s.

◆ OMEstring() [2/7]

OMEstring::OMEstring ( )
inline

◆ OMEstring() [3/7]

OMEstring::OMEstring ( const OMEstring org)
inline

◆ OMEstring() [4/7]

OMEstring::OMEstring ( const char *  s,
uint_fast8_t  impliedCharSet = OME_DEFAULT_CHARSET 
)
inlineexplicit

◆ OMEstring() [5/7]

OMEstring::OMEstring ( const unsigned char *  s,
ssize_t  l = -1,
uint_fast8_t  impliedCharSet = OME_CHARSET_UNDEFINED 
)
inlineexplicit

◆ OMEstring() [6/7]

OMEstring::OMEstring ( OMEstringInROM  s,
ssize_t  l = -1,
uint_fast8_t  impliedCharSet = OME_DEFAULT_CHARSET 
)
inlineexplicit

◆ OMEstring() [7/7]

OMEstring::OMEstring ( size_t  l,
uint_fast8_t  impliedCharSet = OME_CHARSET_UNDEFINED 
)
inlineexplicit

◆ ~OMEstring()

OMEstring::~OMEstring ( )
inline

Member Function Documentation

◆ deepCopy()

OMEstring* OMEstring::deepCopy ( ) const
inline

◆ determineCharacterSet()

◆ getCharacterSet()

◆ lastSubstr() [1/2]

ssize_t OMEstring::lastSubstr ( const OMEstring sub,
size_t  startOffset = ~static_cast<size_t>(0) 
) const
inline

◆ lastSubstr() [2/2]

ssize_t OMEstring::lastSubstr ( const unsigned char *  sub,
size_t  len = ~static_cast<size_t>(0),
size_t  startOffset = ~static_cast<size_t>(0) 
) const
inline

◆ length()

◆ midchar()

unsigned char OMEstring::midchar ( size_t  offset) const
inline

Referenced by midchar().

◆ midstr()

OMEstring* OMEstring::midstr ( size_t  offset,
size_t  len 
) const
inline

Referenced by midstr(), and parseMIMEblock().

◆ noteCharacterSet()

◆ operator const char *()

OMEstring::operator const char * ( ) const
inline

◆ operator const unsigned char *()

OMEstring::operator const unsigned char * ( ) const
inline

◆ operator!=() [1/3]

bool OMEstring::operator!= ( const char *  arg) const
inline

◆ operator!=() [2/3]

bool OMEstring::operator!= ( const OMEstring arg) const
inline

◆ operator!=() [3/3]

bool OMEstring::operator!= ( const unsigned char *  arg) const
inline

◆ operator+()

OMEstring * OMEstring::operator+ ( const OMEstring rop) const

◆ operator+=()

◆ operator<()

bool OMEstring::operator< ( const OMEstring arg) const
inline

◆ operator<=()

bool OMEstring::operator<= ( const OMEstring arg) const
inline

◆ operator=() [1/3]

OMEstring& OMEstring::operator= ( const char *  s)
inline

◆ operator=() [2/3]

◆ operator=() [3/3]

OMEstring& OMEstring::operator= ( const unsigned char *  s)
inline

◆ operator==() [1/3]

bool OMEstring::operator== ( const char *  arg) const
inline

◆ operator==() [2/3]

bool OMEstring::operator== ( const OMEstring arg) const
inline

◆ operator==() [3/3]

bool OMEstring::operator== ( const unsigned char *  arg) const
inline

◆ operator>()

bool OMEstring::operator> ( const OMEstring arg) const
inline

◆ operator>=()

bool OMEstring::operator>= ( const OMEstring arg) const
inline

◆ outputOnStream()

template<typename STREAMTYPE >
STREAMTYPE& OMEstring::outputOnStream ( STREAMTYPE &  outputStream,
int_fast16_t  indent = 0,
uint8_t  includeTypePrefix = 0 
) const
inline

Output an OMEstring to an output stream.

Parameters
outputStreamis a reference to an output stream.
indentspecifies the number of spaces to indent before beginning output. If negative, no indent is performed for the first line, but subsequent lines are indented based on the absolute value of indent.
includeTypePrefixis a mask of flags indicating if type names should prefix data elements, if strings should be enclosed in quotes, etc.

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

◆ outputOnStreamAsHex()

template<typename STREAMTYPE >
STREAMTYPE& OMEstring::outputOnStreamAsHex ( STREAMTYPE &  outputStream,
int_fast16_t  indent = 0,
bool  dense = false 
) const
inline

Output the contents of an OMEstring object to an output stream as a collection of hexadecimal characters.

Parameters
outputStreamis a reference to an output stream.
indentspecifies the number of spaces to indent before beginning output. If negative, no indent is performed for the first line, but subsequent lines are indented based on the absolute value of indent.
denseis a Boolean flag indicating if the content should be output as one contiguous sequence of hexadecimal characters or broken across multiple lines as needed.

Referenced by OMEconnection::sendString(), and skipAndOutputSetToStreamAsHex().

◆ printableCopy()

OMEstring * OMEstring::printableCopy ( ) const

◆ reverse()

OMEstring* OMEstring::reverse ( ) const
inline

Referenced by reverseString().

◆ substr() [1/3]

ssize_t OMEstring::substr ( const char *  sub,
size_t  len = ~static_cast<size_t>(0),
size_t  startOffset = 0 
) const
inline

◆ substr() [2/3]

ssize_t OMEstring::substr ( const OMEstring sub,
size_t  startOffset = 0 
) const
inline

◆ substr() [3/3]

ssize_t OMEstring::substr ( const unsigned char *  sub,
size_t  len = ~static_cast<size_t>(0),
size_t  startOffset = 0 
) const
inline

◆ truncateToLength()

void OMEstring::truncateToLength ( size_t  newLen)
inline

Friends And Related Function Documentation

◆ OMEstringStorage

friend class OMEstringStorage
friend

Referenced by operator+=().

Member Data Documentation

◆ nullOMEstring

const OMEstring OMEstring::nullOMEstring
static

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