OpendTect  6.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FixedString Class Reference

OD::String that holds an existing text string. More...

Inheritance diagram for FixedString:
[legend]

Public Member Functions

 FixedString (const char *p=nullptr)
 
char firstChar () const
 
bool isNull () const
 
 operator bool () const
 
 operator const char * () const
 
bool operator! () const
 
bool operator!= (const BufferString &) const
 
bool operator!= (const char *s) const
 
bool operator!= (const FixedString &fs) const
 
bool operator!= (const OD::String &s) const
 
FixedStringoperator= (const char *p)
 
FixedStringoperator= (const FixedString &fs)
 
FixedStringoperator= (const OD::String &)
 Not impl - on purpose: too dangerous. More...
 
bool operator== (const BufferString &) const
 
bool operator== (const char *s) const
 
bool operator== (const FixedString &fs) const
 
bool operator== (const OD::String &s) const
 
- Public Member Functions inherited from OD::String
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
 
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 FixedStringempty ()
 
- Static Public Member Functions inherited from OD::String
static const Stringempty ()
 

Protected Member Functions

const char * gtBuf () const
 
const char * gtStr () const
 

Protected Attributes

const char * str_
 

Detailed Description

OD::String that holds an existing text string.

The string is assumed to be owned by someone else or be static. In any case, it is assumed be be alive and well for the lifetime of the FixedString.

The FixedString is a light-weight, shallow adapter; it never changes the underlying string.

<>

Constructor & Destructor Documentation

◆ FixedString()

FixedString::FixedString ( const char *  p = nullptr)
inline

Member Function Documentation

◆ empty()

static const FixedString& FixedString::empty ( )
static

◆ firstChar()

char FixedString::firstChar ( ) const
inlinevirtual

Reimplemented from OD::String.

◆ gtBuf()

const char* FixedString::gtBuf ( ) const
inlineprotectedvirtual
Returns
empty even if underlying is null

Implements OD::String.

◆ gtStr()

const char* FixedString::gtStr ( ) const
inlineprotectedvirtual
Returns
null if empty

Implements OD::String.

◆ isNull()

bool FixedString::isNull ( ) const
inline

◆ operator bool()

FixedString::operator bool ( ) const
inline

◆ operator const char *()

FixedString::operator const char * ( ) const
inline

◆ operator!()

bool FixedString::operator! ( ) const
inline

◆ operator!=() [1/4]

bool FixedString::operator!= ( const BufferString ) const

◆ operator!=() [2/4]

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

◆ operator!=() [3/4]

bool FixedString::operator!= ( const FixedString fs) const
inline

◆ operator!=() [4/4]

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

◆ operator=() [1/3]

FixedString& FixedString::operator= ( const char *  p)
inline

◆ operator=() [2/3]

FixedString& FixedString::operator= ( const FixedString fs)
inline

◆ operator=() [3/3]

FixedString & FixedString::operator= ( const OD::String )
inline

Not impl - on purpose: too dangerous.

◆ operator==() [1/4]

bool FixedString::operator== ( const BufferString ) const

◆ operator==() [2/4]

bool FixedString::operator== ( const char *  s) const
inline

◆ operator==() [3/4]

bool FixedString::operator== ( const FixedString fs) const
inline

◆ operator==() [4/4]

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

Member Data Documentation

◆ str_

const char* FixedString::str_
protected

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