OpendTect  6.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OD::String Class Referenceabstract

encapsulates the read-access-only part of strings in OD. More...

Inheritance diagram for OD::String:
[legend]

Public Member Functions

virtual ~String ()
 
const char * buf () const
 
bool contains (char) const
 
bool contains (const char *) const
 
unsigned int count (char) const
 
bool endsWith (const char *, CaseSensitivity c=CaseSensitive) const
 
const char * find (char) const
 
const char * find (const char *) const
 
const char * findLast (char) const
 
const char * findLast (const char *) const
 
virtual char firstChar () const
 
unsigned int getLevenshteinDist (const char *, bool casesens) const
 
bool isEmpty () const
 
bool isEndOf (const char *, CaseSensitivity c=CaseSensitive) const
 
bool isEqual (const char *, CaseSensitivity c=CaseSensitive) const
 
bool isNumber (bool int_only=false) const
 
bool isStartOf (const char *, CaseSensitivity c=CaseSensitive) const
 
bool isYesNo () const
 
virtual char lastChar () const
 
bool matches (const char *, CaseSensitivity c=CaseSensitive) const
 
 operator const char * () const
 
bool operator!= (const char *) const
 
bool operator!= (const String &) const
 
template<class T >
bool operator!= (const T &t) const
 
bool operator< (const char *) const
 
bool operator< (const String &) const
 
template<class T >
bool operator< (const T &) const
 
bool operator== (const char *) const
 
bool operator== (const String &) const
 
template<class T >
bool operator== (const T &) const
 
bool operator> (const char *) const
 
bool operator> (const String &) const
 
template<class T >
bool operator> (const T &) const
 
const char & operator[] (int idx) const
 
unsigned int size () const
 
bool startsWith (const char *, CaseSensitivity c=CaseSensitive) const
 
const char * str () const
 
bool toBool () const
 
double toDouble () const
 
float toFloat () const
 
int toInt () const
 
uint64_t toUInt64 () const
 

Static Public Member Functions

static const Stringempty ()
 

Protected Member Functions

virtual const char * gtBuf () const =0
 
virtual const char * gtStr () const =0
 

Detailed Description

encapsulates the read-access-only part of strings in OD.

buf() always returns a valid null-terminated string. str() is the opposite: it always returns null if the string is empty

<>

Constructor & Destructor Documentation

◆ ~String()

virtual OD::String::~String ( )
inlinevirtual

Member Function Documentation

◆ buf()

const char* OD::String::buf ( ) const
inline

◆ contains() [1/2]

bool OD::String::contains ( char  ) const

◆ contains() [2/2]

bool OD::String::contains ( const char *  ) const

◆ count()

unsigned int OD::String::count ( char  ) const

◆ empty()

static const String& OD::String::empty ( )
static

◆ endsWith()

bool OD::String::endsWith ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ find() [1/2]

const char* OD::String::find ( char  ) const

◆ find() [2/2]

const char* OD::String::find ( const char *  ) const

◆ findLast() [1/2]

const char* OD::String::findLast ( char  ) const

◆ findLast() [2/2]

const char* OD::String::findLast ( const char *  ) const

◆ firstChar()

virtual char OD::String::firstChar ( ) const
inlinevirtual

Reimplemented in FixedString.

◆ getLevenshteinDist()

unsigned int OD::String::getLevenshteinDist ( const char *  ,
bool  casesens 
) const

◆ gtBuf()

virtual const char* OD::String::gtBuf ( ) const
protectedpure virtual
Returns
empty even if underlying is null

Implemented in FixedString, and BufferString.

◆ gtStr()

virtual const char* OD::String::gtStr ( ) const
protectedpure virtual
Returns
null if empty

Implemented in FixedString, and BufferString.

◆ isEmpty()

bool OD::String::isEmpty ( ) const
inline

◆ isEndOf()

bool OD::String::isEndOf ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ isEqual()

bool OD::String::isEqual ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ isNumber()

bool OD::String::isNumber ( bool  int_only = false) const

◆ isStartOf()

bool OD::String::isStartOf ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ isYesNo()

bool OD::String::isYesNo ( ) const

◆ lastChar()

virtual char OD::String::lastChar ( ) const
inlinevirtual

◆ matches()

bool OD::String::matches ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ operator const char *()

OD::String::operator const char * ( ) const
inline

◆ operator!=() [1/3]

bool OD::String::operator!= ( const char *  s) const
inline

◆ operator!=() [2/3]

bool OD::String::operator!= ( const String s) const
inline

◆ operator!=() [3/3]

template<class T >
bool OD::String::operator!= ( const T &  t) const
inline

◆ operator<() [1/3]

bool OD::String::operator< ( const char *  ) const

◆ operator<() [2/3]

bool OD::String::operator< ( const String oth) const
inline

◆ operator<() [3/3]

template<class T >
bool OD::String::operator< ( const T &  t) const
inline

◆ operator==() [1/3]

bool OD::String::operator== ( const char *  s) const
inline

◆ operator==() [2/3]

bool OD::String::operator== ( const String s) const
inline

◆ operator==() [3/3]

template<class T >
bool OD::String::operator== ( const T &  t) const
inline

◆ operator>() [1/3]

bool OD::String::operator> ( const char *  ) const

◆ operator>() [2/3]

bool OD::String::operator> ( const String oth) const
inline

◆ operator>() [3/3]

template<class T >
bool OD::String::operator> ( const T &  t) const
inline

◆ operator[]()

const char& OD::String::operator[] ( int  idx) const
inline

◆ size()

unsigned int OD::String::size ( ) const

◆ startsWith()

bool OD::String::startsWith ( const char *  ,
CaseSensitivity  c = CaseSensitive 
) const

◆ str()

const char* OD::String::str ( ) const
inline

◆ toBool()

bool OD::String::toBool ( ) const

◆ toDouble()

double OD::String::toDouble ( ) const

◆ toFloat()

float OD::String::toFloat ( ) const

◆ toInt()

int OD::String::toInt ( ) const

◆ toUInt64()

uint64_t OD::String::toUInt64 ( ) const

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