OpendTect
6.6
|
List encoded in a string. More...
Public Member Functions | |
SeparStringSB (const char *escapedstr=nullptr, char separ=',') | |
SeparStringSB (const SeparStringSB &ss) | |
SeparStringSB & | add (const BufferStringSet &) |
Concatenation. More... | |
SeparStringSB & | add (const char *unescapedstr) |
SeparStringSB & | add (const DBKey &, bool withsurvloc=true) |
SeparStringSB & | add (const OD::String &ods) |
SeparStringSB & | add (const SeparStringSB &) |
Concatenation. More... | |
template<class T > | |
SeparStringSB & | add (T t) |
const char * | buf () const |
Output escaped. More... | |
FixedString | from (int) const |
Output escaped. More... | |
char * | getCStr () |
Output escaped. More... | |
double | getDValue (int) const |
float | getFValue (int) const |
short | getI16Value (int) const |
int64_t | getI64Value (int) const |
int | getIValue (int) const |
unsigned short | getUI16Value (int) const |
uint64_t | getUI64Value (int) const |
unsigned int | getUIValue (int) const |
bool | getYN (int) const |
int | indexOf (const char *unescapedstr) const |
bool | isEmpty () const |
operator const char * () const | |
template<class T > | |
SeparStringSB & | operator+= (const OD::String &ods) |
template<class T > | |
SeparStringSB & | operator+= (T t) |
SeparStringSB & | operator= (const char *escapedstr) |
SeparStringSB & | operator= (const SeparStringSB &) |
FixedString | operator[] (int) const |
Output unescaped. More... | |
StringBuilder & | rep () |
Output escaped. More... | |
char | sepChar () const |
const char * | sepStr () const |
SeparStringSB & | set (const BufferStringSet &bss) |
SeparStringSB & | set (const char *unescapedstr) |
SeparStringSB & | set (const OD::String &ods) |
SeparStringSB & | set (const SeparStringSB &s) |
template<class T > | |
SeparStringSB & | set (T t) |
void | setEmpty () |
void | setSepChar (char) |
int | size () const |
const char * | str () const |
Output escaped. More... | |
const char * | unescapedStr () const |
Private Member Functions | |
const char * | findSeparator (const char *) const |
const char * | getEscaped (const char *unescapedstr, char sep) const |
const char * | getUnescaped (const char *escapedstartptr, const char *nextsep=nullptr) const |
void | initRep (const char *) |
void | initSep (char s) |
Private Attributes | |
StringBuilder | rep_ |
BufferString | retstr_ |
char | sep_ [2] |
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.
The new class SeparStringSB is based on the new StringBuilder, and will perform much better that the legacy SeparString class.
<>
|
inline |
|
inline |
SeparStringSB& SeparStringSB::add | ( | const BufferStringSet & | ) |
Concatenation.
SeparStringSB& SeparStringSB::add | ( | const char * | unescapedstr | ) |
SeparStringSB& SeparStringSB::add | ( | const DBKey & | , |
bool | withsurvloc = true |
||
) |
|
inline |
SeparStringSB& SeparStringSB::add | ( | const SeparStringSB & | ) |
Concatenation.
|
inline |
|
inline |
Output escaped.
|
private |
FixedString SeparStringSB::from | ( | int | ) | const |
Output escaped.
|
inline |
Output escaped.
double SeparStringSB::getDValue | ( | int | ) | const |
|
private |
float SeparStringSB::getFValue | ( | int | ) | const |
short SeparStringSB::getI16Value | ( | int | ) | const |
int64_t SeparStringSB::getI64Value | ( | int | ) | const |
int SeparStringSB::getIValue | ( | int | ) | const |
unsigned short SeparStringSB::getUI16Value | ( | int | ) | const |
uint64_t SeparStringSB::getUI64Value | ( | int | ) | const |
unsigned int SeparStringSB::getUIValue | ( | int | ) | const |
|
private |
bool SeparStringSB::getYN | ( | int | ) | const |
int SeparStringSB::indexOf | ( | const char * | unescapedstr | ) | const |
|
private |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
SeparStringSB& SeparStringSB::operator= | ( | const char * | escapedstr | ) |
SeparStringSB& SeparStringSB::operator= | ( | const SeparStringSB & | ) |
FixedString SeparStringSB::operator[] | ( | int | ) | const |
Output unescaped.
|
inline |
Output escaped.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void SeparStringSB::setSepChar | ( | char | ) |
int SeparStringSB::size | ( | ) | const |
|
inline |
Output escaped.
|
inline |
Use with care! Distinction between separ-chars and escaped separ-chars will get lost.
|
private |
|
mutableprivate |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022