OpendTect-6_4  6.4
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SeparString Class Reference

List encoded in a string. More...

Inheritance diagram for SeparString:
[legend]

Public Member Functions

 SeparString (const char *escapedstr=0, char separ=',')
 
 SeparString (const SeparString &ss)
 
SeparStringoperator= (const SeparString &)
 
SeparStringoperator= (const char *escapedstr)
 
bool isEmpty () const
 
void setEmpty ()
 
int size () const
 
FixedString operator[] (int) const
 Output unescaped. More...
 
FixedString from (int) const
 Output escaped. More...
 
int getIValue (int) const
 
unsigned int getUIValue (int) const
 
int64_t getI64Value (int) const
 
uint64_t getUI64Value (int) const
 
float getFValue (int) const
 
double getDValue (int) const
 
bool getYN (int) const
 
int indexOf (const char *unescapedstr) const
 
SeparStringadd (const BufferStringSet &)
 Concatenation. More...
 
SeparStringadd (const SeparString &)
 Concatenation. More...
 
SeparStringadd (const char *unescapedstr)
 
SeparStringadd (const OD::String &ods)
 
template<class T >
SeparStringadd (T t)
 
template<class T >
SeparStringoperator+= (T t)
 
template<class T >
SeparStringoperator+= (const OD::String &ods)
 
 operator const char * () const
 
char * getCStr ()
 Output escaped. More...
 
const char * buf () const
 Output escaped. More...
 
BufferStringrep ()
 Output escaped. More...
 
const OD::Stringrep () const
 Output escaped. More...
 
const char * unescapedStr () const
 
char sepChar () const
 
const char * sepStr () const
 
void setSepChar (char)
 

Private Member Functions

void initRep (const char *)
 
void initSep (char s)
 
const char * getEscaped (const char *unescapedstr, char sep) const
 
const char * getUnescaped (const char *escapedstartptr, const char *nextsep=0) const
 
const char * findSeparator (const char *) const
 

Private Attributes

char sep_ [2]
 
BufferString rep_
 
BufferString retstr_
 

Detailed Description

List encoded in a string.

SeparString is a list encoded in a string where the items are separated by a user chosen separator. The separator in the input is escaped with a backslash. A `\' is encoded as `\' . Elements can have any size. Input and output of elements is done unescaped. Input and output of whole (sub)strings is done escaped.

Constructor & Destructor Documentation

SeparString::SeparString ( const char *  escapedstr = 0,
char  separ = ',' 
)
inline
SeparString::SeparString ( const SeparString ss)
inline

Member Function Documentation

SeparString& SeparString::add ( const BufferStringSet )

Concatenation.

SeparString& SeparString::add ( const SeparString )

Concatenation.

SeparString& SeparString::add ( const char *  unescapedstr)
SeparString& SeparString::add ( const OD::String ods)
inline
template<class T >
SeparString& SeparString::add ( t)
inline
const char* SeparString::buf ( ) const
inline

Output escaped.

const char* SeparString::findSeparator ( const char *  ) const
private
FixedString SeparString::from ( int  ) const

Output escaped.

char* SeparString::getCStr ( )
inline

Output escaped.

double SeparString::getDValue ( int  ) const
const char* SeparString::getEscaped ( const char *  unescapedstr,
char  sep 
) const
private
float SeparString::getFValue ( int  ) const
int64_t SeparString::getI64Value ( int  ) const
int SeparString::getIValue ( int  ) const
uint64_t SeparString::getUI64Value ( int  ) const
unsigned int SeparString::getUIValue ( int  ) const
const char* SeparString::getUnescaped ( const char *  escapedstartptr,
const char *  nextsep = 0 
) const
private
bool SeparString::getYN ( int  ) const
int SeparString::indexOf ( const char *  unescapedstr) const
void SeparString::initRep ( const char *  )
private
void SeparString::initSep ( char  s)
inlineprivate
bool SeparString::isEmpty ( ) const
inline
SeparString::operator const char * ( ) const
inline
template<class T >
SeparString& SeparString::operator+= ( t)
inline
template<class T >
SeparString& SeparString::operator+= ( const OD::String ods)
inline
SeparString& SeparString::operator= ( const SeparString )
SeparString& SeparString::operator= ( const char *  escapedstr)
FixedString SeparString::operator[] ( int  ) const

Output unescaped.

BufferString& SeparString::rep ( )
inline

Output escaped.

const OD::String& SeparString::rep ( ) const
inline

Output escaped.

char SeparString::sepChar ( ) const
inline
const char* SeparString::sepStr ( ) const
inline
void SeparString::setEmpty ( )
inline
void SeparString::setSepChar ( char  )
int SeparString::size ( ) const
const char* SeparString::unescapedStr ( ) const
inline

Use with care! Distinction between separ-chars and escaped separ-chars will get lost.

Member Data Documentation

BufferString SeparString::rep_
private
BufferString SeparString::retstr_
mutableprivate
char SeparString::sep_[2]
private

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019