Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::String Class Reference

#include "OVR_String.h"

Collaboration diagram for OVR::String:
Collaboration graph

Data Structures

struct  DataDesc
 
union  DataDescUnion
 
struct  HashFunctor
 
struct  InitStruct
 
struct  NoCaseHashFunctor
 
struct  NoCaseKey
 
struct  NoConstructor
 

Public Member Functions

 String ()
 
 String (const char *data)
 
 String (const char *data1, const char *pdata2, const char *pdata3=0)
 
 String (const char *data, UPInt buflen)
 
 String (const String &src)
 
 String (const StringBuffer &src)
 
 String (const InitStruct &src, UPInt size)
 
 String (const wchar_t *data)
 
 ~String ()
 
void Clear ()
 
 operator const char * () const
 
const char * ToCStr () const
 
UPInt GetSize () const
 
bool IsEmpty () const
 
UPInt GetLength () const
 
UInt32 GetCharAt (UPInt index) const
 
UInt32 GetFirstCharAt (UPInt index, const char **offset) const
 
UInt32 GetNextChar (const char **offset) const
 
void AppendChar (UInt32 ch)
 
void AppendString (const wchar_t *pstr, SPInt len=-1)
 
void AppendString (const char *putf8str, SPInt utf8StrSz=-1)
 
void AssignString (const InitStruct &src, UPInt size)
 
void AssignString (const char *putf8str, UPInt size)
 
void Remove (UPInt posAt, SPInt len=1)
 
String Substring (UPInt start, UPInt end) const
 
String ToUpper () const
 
String ToLower () const
 
StringInsert (const char *substr, UPInt posAt, SPInt len=-1)
 
UPInt InsertCharAt (UInt32 c, UPInt posAt)
 
UPInt GetByteIndex (UPInt index) const
 
bool HasAbsolutePath () const
 
bool HasExtension () const
 
bool HasProtocol () const
 
String GetProtocol () const
 
String GetPath () const
 
String GetFilename () const
 
String GetExtension () const
 
void StripProtocol ()
 
void StripExtension ()
 
void operator= (const char *str)
 
void operator= (const wchar_t *str)
 
void operator= (const String &src)
 
void operator= (const StringBuffer &src)
 
void operator+= (const String &src)
 
void operator+= (const char *psrc)
 
void operator+= (const wchar_t *psrc)
 
void operator+= (char ch)
 
String operator+ (const char *str) const
 
String operator+ (const String &src) const
 
bool operator== (const String &str) const
 
bool operator!= (const String &str) const
 
bool operator== (const char *str) const
 
bool operator!= (const char *str) const
 
bool operator< (const char *pstr) const
 
bool operator< (const String &str) const
 
bool operator> (const char *pstr) const
 
bool operator> (const String &str) const
 
int CompareNoCase (const char *pstr) const
 
int CompareNoCase (const String &str) const
 
const char & operator[] (int index) const
 
const char & operator[] (UPInt index) const
 
bool operator== (const NoCaseKey &strKey) const
 
bool operator!= (const NoCaseKey &strKey) const
 

Static Public Member Functions

static int OVR_STDCALL CompareNoCase (const char *a, const char *b)
 
static int OVR_STDCALL CompareNoCase (const char *a, const char *b, SPInt len)
 
static UPInt OVR_STDCALL BernsteinHashFunctionCIS (const void *pdataIn, UPInt size, UPInt seed=5381)
 
static UPInt OVR_STDCALL BernsteinHashFunction (const void *pdataIn, UPInt size, UPInt seed=5381)
 
static bool HasAbsolutePath (const char *path)
 
static bool HasExtension (const char *path)
 
static bool HasProtocol (const char *path)
 

Static Public Attributes

static DataDesc NullData = {String_LengthIsSize, 1, {0} }
 

Protected Types

enum  FlagConstants { Flag_LengthIsSizeShift = (sizeof(UPInt)*8 - 1) }
 
enum  HeapType { HT_Global = 0, HT_Local = 1, HT_Dynamic = 2, HT_Mask = 3 }
 

Protected Member Functions

HeapType GetHeapType () const
 
DataDescGetData () const
 
void SetData (DataDesc *pdesc)
 
DataDescAllocData (UPInt size, UPInt lengthIsSize)
 
DataDescAllocDataCopy1 (UPInt size, UPInt lengthIsSize, const char *pdata, UPInt copySize)
 
DataDescAllocDataCopy2 (UPInt size, UPInt lengthIsSize, const char *pdata1, UPInt copySize1, const char *pdata2, UPInt copySize2)
 
 String (const NoConstructor &)
 

Protected Attributes

union {
DataDescpData
 
UPInt HeapTypeBits
 
}; 
 

Detailed Description

Definition at line 53 of file OVR_String.h.


Data Structure Documentation

union OVR::String::DataDescUnion

Definition at line 114 of file OVR_String.h.

Collaboration diagram for OVR::String::DataDescUnion:
Collaboration graph
Data Fields
UPInt HeapTypeBits
DataDesc * pData
struct OVR::String::NoConstructor

Definition at line 146 of file OVR_String.h.

Collaboration diagram for OVR::String::NoConstructor:
Collaboration graph

Member Enumeration Documentation

Enumerator
Flag_LengthIsSizeShift 

Definition at line 57 of file OVR_String.h.

enum OVR::String::HeapType
protected
Enumerator
HT_Global 
HT_Local 
HT_Dynamic 
HT_Mask 

Definition at line 102 of file OVR_String.h.

Constructor & Destructor Documentation

OVR::String::String ( const NoConstructor )
inlineprotected

Definition at line 147 of file OVR_String.h.

OVR::String::String ( )

Definition at line 44 of file OVR_String.cpp.

OVR::String::String ( const char *  data)

Definition at line 50 of file OVR_String.cpp.

OVR::String::String ( const char *  data1,
const char *  pdata2,
const char *  pdata3 = 0 
)

Definition at line 57 of file OVR_String.cpp.

OVR::String::String ( const char *  data,
UPInt  buflen 
)

Definition at line 70 of file OVR_String.cpp.

OVR::String::String ( const String src)

Definition at line 83 of file OVR_String.cpp.

OVR::String::String ( const StringBuffer src)

Definition at line 89 of file OVR_String.cpp.

OVR::String::String ( const InitStruct src,
UPInt  size 
)

Definition at line 77 of file OVR_String.cpp.

OVR::String::String ( const wchar_t *  data)
explicit

Definition at line 94 of file OVR_String.cpp.

OVR::String::~String ( )
inline

Definition at line 170 of file OVR_String.h.

Member Function Documentation

String::DataDesc * OVR::String::AllocData ( UPInt  size,
UPInt  lengthIsSize 
)
protected

Definition at line 104 of file OVR_String.cpp.

String::DataDesc * OVR::String::AllocDataCopy1 ( UPInt  size,
UPInt  lengthIsSize,
const char *  pdata,
UPInt  copySize 
)
protected

Definition at line 123 of file OVR_String.cpp.

String::DataDesc * OVR::String::AllocDataCopy2 ( UPInt  size,
UPInt  lengthIsSize,
const char *  pdata1,
UPInt  copySize1,
const char *  pdata2,
UPInt  copySize2 
)
protected

Definition at line 131 of file OVR_String.cpp.

void OVR::String::AppendChar ( UInt32  ch)

Definition at line 214 of file OVR_String.cpp.

void OVR::String::AppendString ( const wchar_t *  pstr,
SPInt  len = -1 
)

Definition at line 231 of file OVR_String.cpp.

void OVR::String::AppendString ( const char *  putf8str,
SPInt  utf8StrSz = -1 
)

Definition at line 249 of file OVR_String.cpp.

void OVR::String::AssignString ( const InitStruct src,
UPInt  size 
)

Definition at line 264 of file OVR_String.cpp.

void OVR::String::AssignString ( const char *  putf8str,
UPInt  size 
)

Definition at line 273 of file OVR_String.cpp.

UPInt OVR::String::BernsteinHashFunction ( const void *  pdataIn,
UPInt  size,
UPInt  seed = 5381 
)
static

Definition at line 521 of file OVR_String.cpp.

UPInt OVR::String::BernsteinHashFunctionCIS ( const void *  pdataIn,
UPInt  size,
UPInt  seed = 5381 
)
static

Definition at line 535 of file OVR_String.cpp.

void OVR::String::Clear ( void  )

Definition at line 386 of file OVR_String.cpp.

int OVR::String::CompareNoCase ( const char *  a,
const char *  b 
)
static

Definition at line 488 of file OVR_String.cpp.

int OVR::String::CompareNoCase ( const char *  a,
const char *  b,
SPInt  len 
)
static

Definition at line 493 of file OVR_String.cpp.

int OVR::String::CompareNoCase ( const char *  pstr) const
inline

Definition at line 334 of file OVR_String.h.

int OVR::String::CompareNoCase ( const String str) const
inline

Definition at line 338 of file OVR_String.h.

UPInt OVR::String::GetByteIndex ( UPInt  index) const
inline

Definition at line 239 of file OVR_String.h.

UInt32 OVR::String::GetCharAt ( UPInt  index) const

Definition at line 163 of file OVR_String.cpp.

DataDesc* OVR::String::GetData ( ) const
inlineprotected

Definition at line 121 of file OVR_String.h.

String OVR::String::GetExtension ( ) const

Definition at line 187 of file OVR_String_PathUtil.cpp.

String OVR::String::GetFilename ( ) const

Definition at line 181 of file OVR_String_PathUtil.cpp.

UInt32 OVR::String::GetFirstCharAt ( UPInt  index,
const char **  offset 
) const

Definition at line 181 of file OVR_String.cpp.

HeapType OVR::String::GetHeapType ( ) const
inlineprotected

Definition at line 119 of file OVR_String.h.

UPInt OVR::String::GetLength ( ) const

Definition at line 142 of file OVR_String.cpp.

UInt32 OVR::String::GetNextChar ( const char **  offset) const

Definition at line 207 of file OVR_String.cpp.

String OVR::String::GetPath ( ) const

Definition at line 164 of file OVR_String_PathUtil.cpp.

String OVR::String::GetProtocol ( ) const

Definition at line 175 of file OVR_String_PathUtil.cpp.

UPInt OVR::String::GetSize ( void  ) const
inline

Definition at line 189 of file OVR_String.h.

bool OVR::String::HasAbsolutePath ( const char *  path)
static

Definition at line 101 of file OVR_String_PathUtil.cpp.

bool OVR::String::HasAbsolutePath ( ) const
inline

Definition at line 265 of file OVR_String.h.

bool OVR::String::HasExtension ( const char *  path)
static

Definition at line 152 of file OVR_String_PathUtil.cpp.

bool OVR::String::HasExtension ( ) const
inline

Definition at line 266 of file OVR_String.h.

bool OVR::String::HasProtocol ( const char *  path)
static

Definition at line 158 of file OVR_String_PathUtil.cpp.

bool OVR::String::HasProtocol ( ) const
inline

Definition at line 267 of file OVR_String.h.

String & OVR::String::Insert ( const char *  substr,
UPInt  posAt,
SPInt  len = -1 
)

Definition at line 444 of file OVR_String.cpp.

UPInt OVR::String::InsertCharAt ( UInt32  c,
UPInt  posAt 
)

Definition at line 475 of file OVR_String.cpp.

bool OVR::String::IsEmpty ( void  ) const
inline

Definition at line 191 of file OVR_String.h.

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

Definition at line 184 of file OVR_String.h.

bool OVR::String::operator!= ( const String str) const
inline

Definition at line 299 of file OVR_String.h.

bool OVR::String::operator!= ( const char *  str) const
inline

Definition at line 309 of file OVR_String.h.

bool OVR::String::operator!= ( const NoCaseKey strKey) const
inline

Definition at line 368 of file OVR_String.h.

String OVR::String::operator+ ( const char *  str) const

Definition at line 329 of file OVR_String.cpp.

String OVR::String::operator+ ( const String src) const

Definition at line 336 of file OVR_String.cpp.

void OVR::String::operator+= ( const String src)

Definition at line 315 of file OVR_String.cpp.

void OVR::String::operator+= ( const char *  psrc)
inline

Definition at line 287 of file OVR_String.h.

void OVR::String::operator+= ( const wchar_t *  psrc)
inline

Definition at line 288 of file OVR_String.h.

void OVR::String::operator+= ( char  ch)
inline

Definition at line 289 of file OVR_String.h.

bool OVR::String::operator< ( const char *  pstr) const
inline

Definition at line 314 of file OVR_String.h.

bool OVR::String::operator< ( const String str) const
inline

Definition at line 319 of file OVR_String.h.

void OVR::String::operator= ( const char *  str)

Definition at line 280 of file OVR_String.cpp.

void OVR::String::operator= ( const wchar_t *  str)

Definition at line 285 of file OVR_String.cpp.

void OVR::String::operator= ( const String src)

Definition at line 297 of file OVR_String.cpp.

void OVR::String::operator= ( const StringBuffer src)

Definition at line 308 of file OVR_String.cpp.

bool OVR::String::operator== ( const String str) const
inline

Definition at line 294 of file OVR_String.h.

bool OVR::String::operator== ( const char *  str) const
inline

Definition at line 304 of file OVR_String.h.

bool OVR::String::operator== ( const NoCaseKey strKey) const
inline

Definition at line 364 of file OVR_String.h.

bool OVR::String::operator> ( const char *  pstr) const
inline

Definition at line 324 of file OVR_String.h.

bool OVR::String::operator> ( const String str) const
inline

Definition at line 329 of file OVR_String.h.

const char& OVR::String::operator[] ( int  index) const
inline

Definition at line 344 of file OVR_String.h.

const char& OVR::String::operator[] ( UPInt  index) const
inline

Definition at line 349 of file OVR_String.h.

void OVR::String::Remove ( UPInt  posAt,
SPInt  len = 1 
)

Definition at line 343 of file OVR_String.cpp.

void OVR::String::SetData ( DataDesc pdesc)
inlineprotected

Definition at line 129 of file OVR_String.h.

void OVR::String::StripExtension ( )

Definition at line 194 of file OVR_String_PathUtil.cpp.

void OVR::String::StripProtocol ( )

Definition at line 204 of file OVR_String_PathUtil.cpp.

String OVR::String::Substring ( UPInt  start,
UPInt  end 
) const

Definition at line 368 of file OVR_String.cpp.

const char* OVR::String::ToCStr ( ) const
inline

Definition at line 186 of file OVR_String.h.

String OVR::String::ToLower ( ) const

Definition at line 418 of file OVR_String.cpp.

String OVR::String::ToUpper ( ) const

Definition at line 394 of file OVR_String.cpp.

Field Documentation

union { ... }
String::DataDesc OVR::String::NullData = {String_LengthIsSize, 1, {0} }
static

Definition at line 176 of file OVR_String.h.


The documentation for this class was generated from the following files: