Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

CL_StringRef16 Class Reference
[clanCore Text]

String reference template. More...

#include <string_ref16.h>

Inheritance diagram for CL_StringRef16:
Inheritance graph
[legend]

List of all members.

Public Types

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

Public Member Functions

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

Static Public Attributes

static const size_type npos

Protected Member Functions

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

Protected Attributes

size_type data_length
wchar_t * data_ptr
bool null_terminated
bool temporary

Detailed Description

String reference template.

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


Member Typedef Documentation

typedef wchar_t CL_StringData16::char_type [inherited]
typedef const wchar_t* CL_StringData16::const_iterator [inherited]
typedef wchar_t* CL_StringData16::iterator [inherited]
typedef unsigned int CL_StringData16::size_type [inherited]

Constructor & Destructor Documentation

CL_StringRef16::CL_StringRef16 (  ) 
CL_StringRef16::CL_StringRef16 ( const std::wstring &  source  ) 

Constructs a StringReference.

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

Constructs a StringReference.

Parameters:
source = String Reference
CL_StringRef16::CL_StringRef16 ( const CL_StringData16 source  ) 

Constructs a StringReference.

CL_StringRef16::CL_StringRef16 ( const char *  c_str  ) 

Constructs a StringReference.

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

Constructs a StringReference.

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

Constructs a StringReference.

Parameters:
wc_str = wchar_t
CL_StringRef16::CL_StringRef16 ( 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_StringRef16::~CL_StringRef16 (  ) 

Member Function Documentation

iterator CL_StringData16::begin (  )  [inline, inherited]

Begin.

Returns:
iterator

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

const_iterator CL_StringData16::begin (  )  const [inline, inherited]

Begin.

Returns:
const_iterator
const wchar_t* CL_StringRef16::c_str (  )  const
void CL_StringRef16::clear (  )  const [protected]

Clear.

int CL_StringData16::compare ( size_type  pos,
size_type  n,
const wchar_t *  s,
size_type  len = npos 
) const [inherited]

Compare.

Parameters:
pos = size_type
n = size_type
s = Char Type
len = size_type
Returns:
int
int CL_StringData16::compare ( const CL_StringData16 s  )  const [inherited]

Compare.

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

Compare.

Parameters:
pos = size_type
n = size_type
s = String Data
Returns:
int
int CL_StringData16::compare ( size_type  pos,
size_type  n,
const CL_StringData16 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_StringData16::compare ( const wchar_t *  s  )  const [inherited]

Compare.

Parameters:
s = Char Type
Returns:
int
void CL_StringRef16::create_temp ( const wchar_t *  data,
size_type  length 
) const [protected]

Create temp.

Parameters:
data = Char Type
length = size_type
wchar_t* CL_StringData16::data (  )  [inline, inherited]

Data.

Returns:
Char Type
const wchar_t* CL_StringData16::data (  )  const [inline, inherited]

Referenced by CL_String16::insert().

bool CL_StringData16::empty (  )  const [inline, inherited]

Empty.

Returns:
bool
iterator CL_StringData16::end (  )  [inline, inherited]

End.

Returns:
iterator

Referenced by CL_String16::erase().

const_iterator CL_StringData16::end (  )  const [inline, inherited]

End.

Returns:
const_iterator
size_type CL_StringData16::find ( const wchar_t *  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_StringData16::find ( const CL_StringData16 s,
size_type  pos = 0 
) const [inherited]

Find.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::find ( wchar_t  c,
size_type  pos = 0 
) const [inherited]

Find.

Parameters:
c = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find ( const wchar_t *  s,
size_type  pos = 0 
) const [inherited]

Find.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_not_of ( const CL_StringData16 s,
size_type  pos = 0 
) const [inherited]

Find first not of.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_not_of ( const wchar_t *  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_StringData16::find_first_not_of ( const wchar_t *  s,
size_type  pos = 0 
) const [inherited]

Find first not of.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_not_of ( wchar_t  c,
size_type  pos = 0 
) const [inherited]

Find first not of.

Parameters:
c = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_of ( const wchar_t *  s,
size_type  pos = 0 
) const [inherited]

Find first of.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_of ( wchar_t  c,
size_type  pos = 0 
) const [inherited]

Find first of.

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

Find first of.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_first_of ( const wchar_t *  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_StringData16::find_last_not_of ( const CL_StringData16 s,
size_type  pos = npos 
) const [inherited]

Find last not of.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_last_not_of ( const wchar_t *  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_StringData16::find_last_not_of ( wchar_t  c,
size_type  pos = npos 
) const [inherited]

Find last not of.

Parameters:
c = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_last_not_of ( const wchar_t *  s,
size_type  pos = npos 
) const [inherited]

Find last not of.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_last_of ( const wchar_t *  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_StringData16::find_last_of ( const CL_StringData16 s,
size_type  pos = npos 
) const [inherited]

Find last of.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_last_of ( const wchar_t *  s,
size_type  pos = npos 
) const [inherited]

Find last of.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::find_last_of ( wchar_t  c,
size_type  pos = npos 
) const [inherited]

Find last of.

Parameters:
c = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::length (  )  const [inline, inherited]

Length.

Returns:
size_type

Referenced by CL_String16::insert().

CL_StringData16::operator CL_StringRef16 (  )  const [inherited]

Convert object to a string reference.

Returns:
operator

Reimplemented in CL_String16.

CL_StringData16::operator std::wstring (  )  const [inherited]

std::wstring

Returns:
operator
CL_StringRef16& CL_StringRef16::operator= ( const CL_StringRef16 source  ) 
CL_StringRef16& CL_StringRef16::operator= ( const wchar_t *  c_str  ) 
CL_StringRef16& CL_StringRef16::operator= ( const CL_StringData16 source  ) 
CL_StringRef16& CL_StringRef16::operator= ( const char *  c_str  ) 
const wchar_t& CL_StringData16::operator[] ( size_type  n  )  const [inline, inherited]
wchar_t& CL_StringData16::operator[] ( size_type  n  )  [inline, inherited]
size_type CL_StringData16::rfind ( const CL_StringData16 s,
size_type  pos = npos 
) const [inherited]

Rfind.

Parameters:
s = String Data
pos = size_type
Returns:
size_type
size_type CL_StringData16::rfind ( wchar_t  c,
size_type  pos = npos 
) const [inherited]

Rfind.

Parameters:
c = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::rfind ( const wchar_t *  s,
size_type  pos = npos 
) const [inherited]

Rfind.

Parameters:
s = Char Type
pos = size_type
Returns:
size_type
size_type CL_StringData16::rfind ( const wchar_t *  s,
size_type  pos,
size_type  n 
) const [inherited]

Rfind.

Parameters:
s = Char Type
pos = size_type
n = size_type
Returns:
size_type
void CL_StringRef16::set_length ( size_type  length  ) 

Set length.

Parameters:
length = size_type
size_type CL_StringData16::size (  )  const [inline, inherited]

Size.

Returns:
size_type
CL_StringRef16 CL_StringData16::substr ( size_type  pos = 0,
size_type  n = npos 
) const [inherited]

Substr.

Parameters:
pos = size_type
n = size_type
Returns:
Reference Class

Member Data Documentation

size_type CL_StringData16::data_length [mutable, protected, inherited]
wchar_t* CL_StringData16::data_ptr [mutable, protected, inherited]
const size_type CL_StringData16::npos [static, inherited]
bool CL_StringRef16::null_terminated [mutable, protected]
bool CL_StringRef16::temporary [mutable, protected]

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