FIXEDSTRING< _CT > Class Template Reference

Fixed-size array-based MIUNICODE string. More...

#include <mi32/fixedstr.h>

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

List of all members.

Classes

class  UNIQUENAMEFILTER
 Unique name filter class to determine if the name given is unique. More...

Public Member Functions

 FIXEDSTRING (TEXTID textid)
 FIXEDSTRING (const MISTRING &string)
 FIXEDSTRING (const MIUNICODE *string)
 FIXEDSTRING (const FIXEDSTRING &rhs)
 FIXEDSTRING ()
 ~FIXEDSTRING ()
void Append (const char *name)
void Assign (const MIUNICODE *name, int len)
void Assign (const char *name, CHAR_ENCODING encoding)
void Assign (const char *name, int len)
void Assign (const char *name)
void Clear ()
int Compare (const MIUNICODE *str) const
int CompareNoCase (const MIUNICODE *str) const
ERRVALUE GenerateUniqueName (UNIQUENAMEFILTER &FilterInst)
ERRVALUE GenerateUniqueName (FastDelegate< int(const FIXEDSTRING< _CT > &)> delegate)
void * GetEncoded (CHAR_ENCODING encoding) const
int GetLength () const
const MIUNICODEGetReference () const
const MIUNICODEGetTail (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) const
bool IsEmpty () const
bool IsValidName (FastDelegate< bool(MIUNICODE)> delegate=FastDelegate< bool(MIUNICODE)>(DftValidNameChar)) const
void MakeValidName (FastDelegate< bool(MIUNICODE)> delegate=FastDelegate< bool(MIUNICODE)>(DftValidNameChar))
 operator const MIUNICODE * () const
bool operator!= (const MIUNICODE *rhs) const
FIXEDSTRINGoperator+= (const MIUNICODE *rhs)
bool operator< (const MIUNICODE *rhs) const
bool operator<= (const MIUNICODE *rhs) const
FIXEDSTRINGoperator= (TEXTID textid)
FIXEDSTRINGoperator= (const MISTRING &rhs)
FIXEDSTRINGoperator= (const MIUNICODE *rhs)
FIXEDSTRINGoperator= (const FIXEDSTRING &rhs)
bool operator== (const MIUNICODE *rhs) const
bool operator> (const MIUNICODE *rhs) const
bool operator>= (const MIUNICODE *rhs) const
void PadToEnd (char item)
void SetLowerCase ()
void SetUpperCase ()
void SwapBytes ()
void Terminate ()
void Truncate (int NewLength)

Static Public Member Functions

static int GetMaxSize ()

Detailed Description

template<int _CT>
class FIXEDSTRING< _CT >

Fixed-size array-based MIUNICODE string.

This class is designed to replace fixed size MIUNICODE 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>
FIXEDSTRING< _CT >::FIXEDSTRING (  )  [inline]

Default constructor, clears the string.

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

Copy constructor.

template<int _CT>
FIXEDSTRING< _CT >::FIXEDSTRING ( const MIUNICODE string  )  [inline]

Copy constructor.

Construct from MIUNICODE string.

template<int _CT>
FIXEDSTRING< _CT >::FIXEDSTRING ( const MISTRING string  )  [inline]

Construct from MISTRING string.

template<int _CT>
FIXEDSTRING< _CT >::FIXEDSTRING ( TEXTID  textid  )  [inline]

Construct from TEXTID.

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

Destructor.


Member Function Documentation

template<int _CT>
void FIXEDSTRING< _CT >::Append ( const char *  name  )  [inline]

Append from ASCII character string.

Parameters:
name Character string to append from
template<int _CT>
void FIXEDSTRING< _CT >::Assign ( const MIUNICODE name,
int  len 
) [inline]

Assign from MIUNICODE string with a max length given.

Parameters:
name MIUNICODE string to assign from
template<int _CT>
void FIXEDSTRING< _CT >::Assign ( const char *  name,
CHAR_ENCODING  encoding 
) [inline]

Assign from character string with specified encoding.

Parameters:
name Character string to assign from
encoding Encoding to use
template<int _CT>
void FIXEDSTRING< _CT >::Assign ( const char *  name,
int  len 
) [inline]

Assign from ASCII string with maximum specified length.

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

Assign from ASCII character string.

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

Clear the whole string.

template<int _CT>
int FIXEDSTRING< _CT >::Compare ( const MIUNICODE str  )  const [inline]

Case-sensitive comparison, length limited (similar to strncmp).

Returns:
0 if strings equal, -1 if this < str, 1 if this > str. Case-sensitive comparison, length limited (similar to strncmp).
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
int FIXEDSTRING< _CT >::CompareNoCase ( const MIUNICODE str  )  const [inline]

Case-insensitive comparison (similar to stricmp).

Returns:
0 if strings equal, -1 if this < str, 1 if this > str. Case-insensitive comparison (similar to stricmp).
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str String to compare to
template<int _CT>
ERRVALUE FIXEDSTRING< _CT >::GenerateUniqueName ( UNIQUENAMEFILTER FilterInst  )  [inline]

Generate an unique name based on the filter passed in.

template<int _CT>
ERRVALUE FIXEDSTRING< _CT >::GenerateUniqueName ( FastDelegate< int(const FIXEDSTRING< _CT > &)>  delegate  )  [inline]

Generate an unique name based on the filter passed in.

template<int _CT>
void* FIXEDSTRING< _CT >::GetEncoded ( CHAR_ENCODING  encoding  )  const [inline]

Get string in specified encoding.

Returns:
Encoded string caller must free.
Parameters:
encoding Encoding
template<int _CT>
int FIXEDSTRING< _CT >::GetLength (  )  const [inline]

Return length of string, not including terminator.

template<int _CT>
static int FIXEDSTRING< _CT >::GetMaxSize (  )  [inline, static]

Return maximum string size, not including terminator.

template<int _CT>
const MIUNICODE* FIXEDSTRING< _CT >::GetReference (  )  const [inline]

Return const string pointer, used for sprintf type parameters.

template<int _CT>
const MIUNICODE* FIXEDSTRING< _CT >::GetTail ( int  maxlen  )  const [inline]

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

template<int _CT>
bool FIXEDSTRING< _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 FIXEDSTRING< _CT >::IniWrite ( INIHANDLE  inih,
const char *  group,
const char *const   field 
) const [inline]

Save the string to values in ini file.

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

Find out if the string is empty.

template<int _CT>
bool FIXEDSTRING< _CT >::IsValidName ( FastDelegate< bool(MIUNICODE)>  delegate = FastDelegate<bool(MIUNICODE)>(DftValidNameChar)  )  const [inline]
template<int _CT>
void FIXEDSTRING< _CT >::MakeValidName ( FastDelegate< bool(MIUNICODE)>  delegate = FastDelegate<bool(MIUNICODE)>(DftValidNameChar)  )  [inline]
template<int _CT>
FIXEDSTRING< _CT >::operator const MIUNICODE * (  )  const [inline]

Cast to <const MIUNICODE*>.

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

Inequality.

template<int _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator+= ( const MIUNICODE rhs  )  [inline]

Concatenate operator.

Concatenate from MIUNICODE string.

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

Less Than.

Less Than

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

Less Than or Equal to.

Less Than or Equal to

template<int _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator= ( TEXTID  textid  )  [inline]

Assign from TEXTID.

Parameters:
textid Message text ID
template<int _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator= ( const MISTRING rhs  )  [inline]

Assign from MISTRING string.

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

Assign from MIUNICODE string.

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

Assignment operator.

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

Equality.

template<int _CT>
bool FIXEDSTRING< _CT >::operator> ( const MIUNICODE rhs  )  const [inline]

Greater Than.

Greater Than

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

Greater Than or Equal to.

Greater Than or Equal to

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

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

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

Set the string to lower case letters.

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

Set the string to upper case letters.

template<int _CT>
void FIXEDSTRING< _CT >::SwapBytes (  )  [inline]

Swap bytes of the string, used for RVC strings.

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

Force termination of string at the end.

template<int _CT>
void FIXEDSTRING< _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