ClanLib  2.3.7
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CL_StringRef8 Class Reference

String reference template. More...

#include <string_ref8.h>

Inheritance diagram for CL_StringRef8:
Inheritance graph
[legend]

Public Types

typedef char char_type
 
typedef const char * const_iterator
 
typedef char * iterator
 
typedef unsigned int size_type
 

Public Member Functions

 CL_StringRef8 ()
 
 CL_StringRef8 (const std::string &source)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const CL_StringRef8 &source)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const CL_StringData8 &source)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const char *c_str)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const char *c_str, size_type length, bool null_terminated)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const wchar_t *wc_str)
 Constructs a StringReference. More...
 
 CL_StringRef8 (const wchar_t *wc_str, size_type length, bool null_terminated)
 Constructs a StringReference. More...
 
 ~CL_StringRef8 ()
 
iterator begin ()
 Begin. More...
 
const_iterator begin () const
 Begin. More...
 
const char * c_str () const
 
int compare (const CL_StringData8 &s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const CL_StringData8 &s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const CL_StringData8 &s, size_type pos1, size_type n1) const
 Compare. More...
 
int compare (const char *s) const
 Compare. More...
 
int compare (size_type pos, size_type n, const char *s, size_type len=npos) const
 Compare. More...
 
const char * data () const
 
char * data ()
 Data. More...
 
bool empty () const
 Empty. More...
 
iterator end ()
 End. More...
 
const_iterator end () const
 End. More...
 
size_type find (const CL_StringData8 &s, size_type pos=0) const
 Find. More...
 
size_type find (const char *s, size_type pos, size_type n) const
 Find. More...
 
size_type find (const char *s, size_type pos=0) const
 Find. More...
 
size_type find (char c, size_type pos=0) const
 Find. More...
 
size_type find_first_not_of (const CL_StringData8 &s, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_not_of (const char *s, size_type pos, size_type n) const
 Find first not of. More...
 
size_type find_first_not_of (const char *s, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_not_of (char c, size_type pos=0) const
 Find first not of. More...
 
size_type find_first_of (const CL_StringData8 &s, size_type pos=0) const
 Find first of. More...
 
size_type find_first_of (const char *s, size_type pos, size_type n) const
 Find first of. More...
 
size_type find_first_of (const char *s, size_type pos=0) const
 Find first of. More...
 
size_type find_first_of (char c, size_type pos=0) const
 Find first of. More...
 
size_type find_last_not_of (const CL_StringData8 &s, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_not_of (const char *s, size_type pos, size_type n) const
 Find last not of. More...
 
size_type find_last_not_of (const char *s, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_not_of (char c, size_type pos=npos) const
 Find last not of. More...
 
size_type find_last_of (const CL_StringData8 &s, size_type pos=npos) const
 Find last of. More...
 
size_type find_last_of (const char *s, size_type pos, size_type n) const
 Find last of. More...
 
size_type find_last_of (const char *s, size_type pos=npos) const
 Find last of. More...
 
size_type find_last_of (char c, size_type pos=npos) const
 Find last of. More...
 
size_type length () const
 Length. More...
 
 operator CL_StringRef8 () const
 Convert object to a string reference. More...
 
 operator std::string () const
 std::string More...
 
CL_StringRef8operator= (const CL_StringRef8 &source)
 
CL_StringRef8operator= (const CL_StringData8 &source)
 
CL_StringRef8operator= (const char *c_str)
 
CL_StringRef8operator= (const wchar_t *c_str)
 
const char & operator[] (size_type n) const
 
char & operator[] (size_type n)
 
size_type rfind (const CL_StringData8 &s, size_type pos=npos) const
 Rfind. More...
 
size_type rfind (const char *s, size_type pos, size_type n) const
 Rfind. More...
 
size_type rfind (const char *s, size_type pos=npos) const
 Rfind. More...
 
size_type rfind (char c, size_type pos=npos) const
 Rfind. More...
 
void set_length (size_type length)
 Set length. More...
 
size_type size () const
 Size. More...
 
CL_StringRef8 substr (size_type pos=0, size_type n=npos) const
 Substr. More...
 
size_type utf8_length () const
 

Static Public Attributes

static const size_type npos
 

Protected Member Functions

void clear () const
 Clear. More...
 
void create_temp (const char *data, size_type length) const
 Create temp. More...
 

Protected Attributes

size_type data_length
 
char * data_ptr
 
bool null_terminated
 
bool temporary
 

Detailed Description

String reference template.

Reference to string data. Extends the basic CL_StringData8 with container functionality required when converting to or from C strings.

Member Typedef Documentation

typedef char CL_StringData8::char_type
inherited
typedef const char* CL_StringData8::const_iterator
inherited
typedef char* CL_StringData8::iterator
inherited
typedef unsigned int CL_StringData8::size_type
inherited

Constructor & Destructor Documentation

CL_StringRef8::CL_StringRef8 ( )
CL_StringRef8::CL_StringRef8 ( const std::string &  source)

Constructs a StringReference.

Parameters
source= Std String
CL_StringRef8::CL_StringRef8 ( const CL_StringRef8 source)

Constructs a StringReference.

Parameters
source= String Reference
CL_StringRef8::CL_StringRef8 ( const CL_StringData8 source)

Constructs a StringReference.

CL_StringRef8::CL_StringRef8 ( const char *  c_str)

Constructs a StringReference.

Parameters
c_str= char
CL_StringRef8::CL_StringRef8 ( const char *  c_str,
size_type  length,
bool  null_terminated 
)

Constructs a StringReference.

Parameters
c_str= char
length= size_type
null_terminated= bool
CL_StringRef8::CL_StringRef8 ( const wchar_t *  wc_str)

Constructs a StringReference.

Parameters
wc_str= wchar_t
CL_StringRef8::CL_StringRef8 ( const wchar_t *  wc_str,
size_type  length,
bool  null_terminated 
)

Constructs a StringReference.

Parameters
wc_str= wchar_t
length= size_type
null_terminated= bool
CL_StringRef8::~CL_StringRef8 ( )

Member Function Documentation

iterator CL_StringData8::begin ( )
inlineinherited

Begin.

Returns
iterator

Referenced by CL_String8::erase(), and CL_String8::insert().

const_iterator CL_StringData8::begin ( ) const
inlineinherited

Begin.

Returns
const_iterator
const char* CL_StringRef8::c_str ( ) const
void CL_StringRef8::clear ( ) const
protected

Clear.

int CL_StringData8::compare ( const CL_StringData8 s) const
inherited

Compare.

Parameters
s= String Data
Returns
int
int CL_StringData8::compare ( size_type  pos,
size_type  n,
const CL_StringData8 s 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= String Data
Returns
int
int CL_StringData8::compare ( size_type  pos,
size_type  n,
const CL_StringData8 s,
size_type  pos1,
size_type  n1 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= String Data
pos1= size_type
n1= size_type
Returns
int
int CL_StringData8::compare ( const char *  s) const
inherited

Compare.

Parameters
s= Char Type
Returns
int
int CL_StringData8::compare ( size_type  pos,
size_type  n,
const char *  s,
size_type  len = npos 
) const
inherited

Compare.

Parameters
pos= size_type
n= size_type
s= Char Type
len= size_type
Returns
int
void CL_StringRef8::create_temp ( const char *  data,
size_type  length 
) const
protected

Create temp.

Parameters
data= Char Type
length= size_type
const char* CL_StringData8::data ( ) const
inlineinherited

Referenced by CL_String8::insert().

char* CL_StringData8::data ( )
inlineinherited

Data.

Returns
Char Type
bool CL_StringData8::empty ( ) const
inlineinherited

Empty.

Returns
bool
iterator CL_StringData8::end ( )
inlineinherited

End.

Returns
iterator

Referenced by CL_String8::erase().

const_iterator CL_StringData8::end ( ) const
inlineinherited

End.

Returns
const_iterator
size_type CL_StringData8::find ( const CL_StringData8 s,
size_type  pos = 0 
) const
inherited

Find.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::find ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Find.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::find ( const char *  s,
size_type  pos = 0 
) const
inherited

Find.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find ( char  c,
size_type  pos = 0 
) const
inherited

Find.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_not_of ( const CL_StringData8 s,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_not_of ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Find first not of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::find_first_not_of ( const char *  s,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_not_of ( char  c,
size_type  pos = 0 
) const
inherited

Find first not of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_of ( const CL_StringData8 s,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_of ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Find first of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::find_first_of ( const char *  s,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_first_of ( char  c,
size_type  pos = 0 
) const
inherited

Find first of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_not_of ( const CL_StringData8 s,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_not_of ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Find last not of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::find_last_not_of ( const char *  s,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_not_of ( char  c,
size_type  pos = npos 
) const
inherited

Find last not of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_of ( const CL_StringData8 s,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_of ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Find last of.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::find_last_of ( const char *  s,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::find_last_of ( char  c,
size_type  pos = npos 
) const
inherited

Find last of.

Parameters
c= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::length ( ) const
inlineinherited

Length.

Returns
size_type

Referenced by CL_String8::insert().

CL_StringData8::operator CL_StringRef8 ( ) const
inherited

Convert object to a string reference.

Returns
operator
CL_StringData8::operator std::string ( ) const
inherited

std::string

Returns
operator
CL_StringRef8& CL_StringRef8::operator= ( const CL_StringRef8 source)
CL_StringRef8& CL_StringRef8::operator= ( const CL_StringData8 source)
CL_StringRef8& CL_StringRef8::operator= ( const char *  c_str)
CL_StringRef8& CL_StringRef8::operator= ( const wchar_t *  c_str)
const char& CL_StringData8::operator[] ( size_type  n) const
inlineinherited
char& CL_StringData8::operator[] ( size_type  n)
inlineinherited
size_type CL_StringData8::rfind ( const CL_StringData8 s,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
s= String Data
pos= size_type
Returns
size_type
size_type CL_StringData8::rfind ( const char *  s,
size_type  pos,
size_type  n 
) const
inherited

Rfind.

Parameters
s= Char Type
pos= size_type
n= size_type
Returns
size_type
size_type CL_StringData8::rfind ( const char *  s,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
s= Char Type
pos= size_type
Returns
size_type
size_type CL_StringData8::rfind ( char  c,
size_type  pos = npos 
) const
inherited

Rfind.

Parameters
c= Char Type
pos= size_type
Returns
size_type
void CL_StringRef8::set_length ( size_type  length)

Set length.

Parameters
length= size_type
size_type CL_StringData8::size ( ) const
inlineinherited

Size.

Returns
size_type
CL_StringRef8 CL_StringData8::substr ( size_type  pos = 0,
size_type  n = npos 
) const
inherited

Substr.

Parameters
pos= size_type
n= size_type
Returns
Reference Class
size_type CL_StringData8::utf8_length ( ) const
inherited

Member Data Documentation

size_type CL_StringData8::data_length
mutableprotectedinherited
char* CL_StringData8::data_ptr
mutableprotectedinherited
const size_type CL_StringData8::npos
staticinherited
bool CL_StringRef8::null_terminated
mutableprotected
bool CL_StringRef8::temporary
mutableprotected

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