Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBcstring Class Template Reference

Objectization of simple, fixed-size C string. **. More...

#include <CTBcstring.hxx>

List of all members.

Public Methods

 CTBcstring ()
 CTBcstring (const char *c_src)
 CTBcstring (const char *c_src, CTBint i_length)
 CTBcstring (const CTBcstring< DIM > &rhs)
CTBint Size () const
CTBint Length () const
void Copy (const char *c_src, CTBint i_offset=0, CTBint i_length=DIM-1)
void Append (const char *c_src, CTBint i_offset=0, CTBint i_length=DIM-1)
void Trim ()
void Toupper ()
void Tolower ()
bool Get (long &i_val, int i_base=0) const
bool Get (unsigned long &i_val, int i_base=0) const
bool Get (int &i_val, int i_base=0) const
bool Get (unsigned int &i_val, int i_base=0) const
bool Get (double &d_val) const
bool Get (float &f_val) const
CTBint Locate (char c_char) const
int NField (const char *c_delim=0) const
bool CopyField (const char *c_src, CTBint i_ind=0, const char *c_delim=0)
bool GetLine (istream &is)
bool FromStream (istream &is)
char & operator[] (CTBint i_ind)
const char & operator[] (CTBint i_ind) const
 operator char * ()
 operator const char * () const
bool operator== (const char *rhs) const
CTBcstring< DIM > & operator= (const char *rhs)
CTBcstring< DIM > & operator+= (const char *rhs)

Protected Attributes

char m_data [DIM]

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const CTBcstring< DIM > &obj)
istream & operator>> (istream &is, CTBcstring< DIM > &obj)


Detailed Description

template<CTBint DIM>
class CTBcstring< DIM >

Objectization of simple, fixed-size C string. **.

Definition at line 17 of file CTBcstring.hxx.


Constructor & Destructor Documentation

template<CTBint DIM>
CTBcstring< DIM >::CTBcstring [inline]
 

Default constructor.

Definition at line 29 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM >::CTBcstring const char * c_src [inline, explicit]
 

Construct from string.

Definition at line 38 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM >::CTBcstring const char * c_src,
CTBint i_length
[inline]
 

Construct from substring.

Definition at line 47 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM >::CTBcstring const CTBcstring< DIM > & rhs [inline]
 

Copy constructor.

Definition at line 56 of file CTBcstring.icc.


Member Function Documentation

template<CTBint DIM>
CTBint CTBcstring< DIM >::Size const [inline]
 

Returns size of string.

Definition at line 65 of file CTBcstring.icc.

template<CTBint DIM>
CTBint CTBcstring< DIM >::Length const [inline]
 

Returns length of string.

Definition at line 74 of file CTBcstring.icc.

Referenced by CTBsystem::ExpandFilename().

template<CTBint DIM>
void CTBcstring< DIM >::Copy const char * c_src,
CTBint i_offset = 0,
CTBint i_length = DIM-1
[inline]
 

Copy string.

Definition at line 83 of file CTBcstring.icc.

Referenced by operator=().

template<CTBint DIM>
void CTBcstring< DIM >::Append const char * c_src,
CTBint i_offset = 0,
CTBint i_length = DIM-1
[inline]
 

Append string.

Definition at line 94 of file CTBcstring.icc.

Referenced by operator+=().

template<CTBint DIM>
void CTBcstring< DIM >::Trim [inline]
 

Trim leading and trailing white space.

Definition at line 105 of file CTBcstring.icc.

template<CTBint DIM>
void CTBcstring< DIM >::Toupper [inline]
 

Convert all characters to uppercase.

Definition at line 115 of file CTBcstring.icc.

template<CTBint DIM>
void CTBcstring< DIM >::Tolower [inline]
 

Convert all characters to lowercase.

Definition at line 125 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get long & i_val,
int i_base = 0
const [inline]
 

Convert string to long integer.

Definition at line 135 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get unsigned long & i_val,
int i_base = 0
const [inline]
 

Convert string to unsigned long integer.

Definition at line 144 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get int & i_val,
int i_base = 0
const [inline]
 

Convert string to int integer.

Definition at line 153 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get unsigned int & i_val,
int i_base = 0
const [inline]
 

Convert string to unsigned int integer.

Definition at line 162 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get double & d_val const [inline]
 

Convert string to double floating point.

Definition at line 171 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::Get float & f_val const [inline]
 

Convert string to float floating point.

Definition at line 180 of file CTBcstring.icc.

template<CTBint DIM>
CTBint CTBcstring< DIM >::Locate char c_char const [inline]
 

Locate character.

Definition at line 189 of file CTBcstring.icc.

template<CTBint DIM>
int CTBcstring< DIM >::NField const char * c_delim = 0 const [inline]
 

Returns number of fields.

Definition at line 198 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::CopyField const char * c_src,
CTBint i_ind = 0,
const char * c_delim = 0
[inline]
 

Copy a field.

Definition at line 207 of file CTBcstring.icc.

Referenced by CTBsystem::ExpandFilename().

template<CTBint DIM>
bool CTBcstring< DIM >::GetLine istream & is [inline]
 

Read line from stream.

Definition at line 217 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::FromStream istream & is [inline]
 

Read from stream.

Definition at line 226 of file CTBcstring.icc.

template<CTBint DIM>
char & CTBcstring< DIM >::operator[] CTBint i_ind [inline]
 

Access character.

Definition at line 235 of file CTBcstring.icc.

template<CTBint DIM>
const char & CTBcstring< DIM >::operator[] CTBint i_ind const [inline]
 

Constant access character.

Definition at line 244 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM >::operator char * [inline]
 

Convert to pointer.

Definition at line 253 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM >::operator const char * const [inline]
 

Constant convert to pointer.

Definition at line 261 of file CTBcstring.icc.

template<CTBint DIM>
bool CTBcstring< DIM >::operator== const char * c_src const [inline]
 

Returns true if equal to string c_src.

Definition at line 270 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM > & CTBcstring< DIM >::operator= const char * c_src [inline]
 

Copy string.

Definition at line 279 of file CTBcstring.icc.

template<CTBint DIM>
CTBcstring< DIM > & CTBcstring< DIM >::operator+= const char * c_src [inline]
 

Append string.

Definition at line 289 of file CTBcstring.icc.


Friends And Related Function Documentation

template<CTBint DIM>
ostream & operator<< ostream & os,
const CTBcstring< DIM > & obj
[related]
 

ostream insertion.

Definition at line 302 of file CTBcstring.icc.

template<CTBint DIM>
istream & operator>> istream & is,
CTBcstring< DIM > & obj
[related]
 

istream extraction.

Definition at line 315 of file CTBcstring.icc.


Member Data Documentation

template<CTBint DIM>
char CTBcstring::m_data[DIM] [protected]
 

Definition at line 69 of file CTBcstring.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:13:35 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001