FIXEDSTRCHAR< _CT > Class Template Reference

Fixed-size array-based 'char' string. More...

#include <mi32/fixedstrchar.h>

Inheritance diagram for FIXEDSTRCHAR< _CT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FIXEDSTRCHAR (const char *string)
 FIXEDSTRCHAR (const FIXEDSTRCHAR &rhs)
 FIXEDSTRCHAR ()
 ~FIXEDSTRCHAR ()
void Assign (const char *name, int len)
void Assign (const char *name)
void Clear ()
int Compare (const char *str) const
int Compare (const FIXEDSTRCHAR &str) const
int CompareNoCase (const char *str) const
int CompareNoCase (const FIXEDSTRCHAR &str) const
int GetLength () const
int GetMaxSize () const
const char * GetTail (int maxlen) const
bool IniRead (INIHANDLE inih, const char *group, const char *const field)
void IniWrite (INIHANDLE inih, const char *group, const char *const field)
bool IsEmpty () const
 operator const char * () const
bool operator!= (const char *rhs) const
bool operator!= (const FIXEDSTRCHAR &rhs) const
FIXEDSTRCHARoperator+= (const char *rhs)
FIXEDSTRCHARoperator+= (const FIXEDSTRCHAR &rhs)
bool operator< (const char *rhs) const
bool operator< (const FIXEDSTRCHAR &rhs) const
bool operator<= (const char *rhs) const
bool operator<= (const FIXEDSTRCHAR &rhs) const
FIXEDSTRCHARoperator= (const char *rhs)
FIXEDSTRCHARoperator= (const FIXEDSTRCHAR &rhs)
bool operator== (const char *rhs) const
bool operator== (const FIXEDSTRCHAR &rhs) const
bool operator> (const char *rhs) const
bool operator> (const FIXEDSTRCHAR &rhs) const
bool operator>= (const char *rhs) const
bool operator>= (const FIXEDSTRCHAR &rhs) const
void PadToEnd (char item)
void SetLowerCase ()
void SetUpperCase ()
void Terminate ()
void Truncate (int NewLength)

Detailed Description

template<int _CT>
class FIXEDSTRCHAR< _CT >

Fixed-size array-based 'char' string.

This class is designed to replace fixed size 'char' array string constructs in other classes and structures. It is not meant as a STRING class implementation. Therefore, the class cannot have virtual methods nor any other members except for the string storage itself.


Constructor & Destructor Documentation

template<int _CT>
FIXEDSTRCHAR< _CT >::FIXEDSTRCHAR (  )  [inline]

Default constructor, clears the string.

template<int _CT>
FIXEDSTRCHAR< _CT >::FIXEDSTRCHAR ( const FIXEDSTRCHAR< _CT > &  rhs  )  [inline]

Copy constructor.

template<int _CT>
FIXEDSTRCHAR< _CT >::FIXEDSTRCHAR ( const char *  string  )  [inline]

Construct from char string.

template<int _CT>
FIXEDSTRCHAR< _CT >::~FIXEDSTRCHAR (  )  [inline]

Destructor.


Member Function Documentation

template<int _CT>
void FIXEDSTRCHAR< _CT >::Assign ( const char *  name,
int  len 
) [inline]

Assign from char string with a max length given.

Parameters:
name char string to assign from
template<int _CT>
void FIXEDSTRCHAR< _CT >::Assign ( const char *  name  )  [inline]

Assign from character string.

Parameters:
name Character string to assign from
template<int _CT>
void FIXEDSTRCHAR< _CT >::Clear (  )  [inline]

Clear the whole string.

template<int _CT>
int FIXEDSTRCHAR< _CT >::Compare ( const char *  str  )  const [inline]

Case-sensitive comparison, (similar to strcmp).

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
int FIXEDSTRCHAR< _CT >::Compare ( const FIXEDSTRCHAR< _CT > &  str  )  const [inline]

Case-sensitive comparison, similar to strcmp.

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
int FIXEDSTRCHAR< _CT >::CompareNoCase ( const char *  str  )  const [inline]

Case-insensitive comparison (similar to stricmp).

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
int FIXEDSTRCHAR< _CT >::CompareNoCase ( const FIXEDSTRCHAR< _CT > &  str  )  const [inline]

Case-insensitive comparison (similar to stricmp).

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
int FIXEDSTRCHAR< _CT >::GetLength (  )  const [inline]

Return length of string, not including terminator.

template<int _CT>
int FIXEDSTRCHAR< _CT >::GetMaxSize (  )  const [inline]

Return maximum string size, not including terminator.

template<int _CT>
const char* FIXEDSTRCHAR< _CT >::GetTail ( int  maxlen  )  const [inline]

Get tail of string having up to specified number of characters.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::IniRead ( INIHANDLE  inih,
const char *  group,
const char *const   field 
) [inline]

Set the string according to values in ini file.

Returns:
: 'true' if entry found and information read, false if empty field or field does not exist
template<int _CT>
void FIXEDSTRCHAR< _CT >::IniWrite ( INIHANDLE  inih,
const char *  group,
const char *const   field 
) [inline]

Save the string to values in ini file.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::IsEmpty (  )  const [inline]

Find out if the string is empty.

template<int _CT>
FIXEDSTRCHAR< _CT >::operator const char * (  )  const [inline]

Cast to <const char*>.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator!= ( const char *  rhs  )  const [inline]

Inequality.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator!= ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Inequality.

template<int _CT>
FIXEDSTRCHAR& FIXEDSTRCHAR< _CT >::operator+= ( const char *  rhs  )  [inline]

Concatenate from char string.

Parameters:
rhs String to concatinate from
template<int _CT>
FIXEDSTRCHAR& FIXEDSTRCHAR< _CT >::operator+= ( const FIXEDSTRCHAR< _CT > &  rhs  )  [inline]

Concatenate operator.

Parameters:
rhs String to concatinate from
template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator< ( const char *  rhs  )  const [inline]

Less Than.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator< ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Less Than.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator<= ( const char *  rhs  )  const [inline]

Less Than or Equal to.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator<= ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Less Than or Equal to.

template<int _CT>
FIXEDSTRCHAR& FIXEDSTRCHAR< _CT >::operator= ( const char *  rhs  )  [inline]

Assign from char string.

Parameters:
rhs String to assign from
template<int _CT>
FIXEDSTRCHAR& FIXEDSTRCHAR< _CT >::operator= ( const FIXEDSTRCHAR< _CT > &  rhs  )  [inline]

Assignment operator.

Parameters:
rhs String to assign from
template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator== ( const char *  rhs  )  const [inline]

Equality.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator== ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Equality.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator> ( const char *  rhs  )  const [inline]

Greater Than.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator> ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Greater Than.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator>= ( const char *  rhs  )  const [inline]

Greater Than or Equal to.

template<int _CT>
bool FIXEDSTRCHAR< _CT >::operator>= ( const FIXEDSTRCHAR< _CT > &  rhs  )  const [inline]

Greater Than or Equal to.

template<int _CT>
void FIXEDSTRCHAR< _CT >::PadToEnd ( char  item  )  [inline]

Pad the string with a char to the end of the buffer.

template<int _CT>
void FIXEDSTRCHAR< _CT >::SetLowerCase (  )  [inline]

Set the string to lower case letters.

template<int _CT>
void FIXEDSTRCHAR< _CT >::SetUpperCase (  )  [inline]

Set the string to upper case letters.

template<int _CT>
void FIXEDSTRCHAR< _CT >::Terminate (  )  [inline]

Force termination of string at the end.

template<int _CT>
void FIXEDSTRCHAR< _CT >::Truncate ( int  NewLength  )  [inline]

Truncate the string, has no effect if the string is shorter than NewLength.


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

Generated on Sun Oct 7 21:33:23 2012 for TNTsdk 2012 by  doxygen 1.6.1