FIXEDSTRING< _CT > Class Template Reference

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

#include <mi32/fixedstr.h>

Inheritance diagram for FIXEDSTRING< _CT >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void Append (const char *name)
void Assign (const UNICODE *name, size_t len)
void Assign (const char *name, CHAR_ENCODING encoding)
void Assign (const char *name, size_t len)
void Assign (const char *name)
void Clear ()
int Compare (const UNICODE *str) const
int Compare (const FIXEDSTRING &str) const
int CompareNoCase (const UNICODE *str) const
int CompareNoCase (const FIXEDSTRING &str) const
 FIXEDSTRING (TEXTID textid)
 FIXEDSTRING (const MISTRING &string)
 FIXEDSTRING (const UNICODE *string)
template<int _T2>  FIXEDSTRING (const FIXEDSTRING< _T2 > &rhs)
 FIXEDSTRING (const FIXEDSTRING &rhs)
 FIXEDSTRING ()
ERRVALUE GenerateUniqueName (UNIQUENAMEFILTER &FilterInst)
void * GetEncoded (CHAR_ENCODING encoding) const
size_t GetLength () const
const UNICODEGetReference () const
const UNICODEGetTail (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 UNICODE * () const
bool operator!= (const UNICODE *rhs) const
bool operator!= (const FIXEDSTRING &rhs) const
FIXEDSTRINGoperator+= (const UNICODE *rhs)
template<int _T2> FIXEDSTRING< _CT > & operator+= (const FIXEDSTRING< _T2 > &rhs)
bool operator< (const UNICODE *rhs) const
bool operator< (const FIXEDSTRING &rhs) const
bool operator<= (const UNICODE *rhs) const
bool operator<= (const FIXEDSTRING &rhs) const
FIXEDSTRINGoperator= (TEXTID textid)
FIXEDSTRINGoperator= (const MISTRING &rhs)
FIXEDSTRINGoperator= (const UNICODE *rhs)
template<int _T2> FIXEDSTRING< _CT > & operator= (const FIXEDSTRING< _T2 > &rhs)
FIXEDSTRINGoperator= (const FIXEDSTRING &rhs)
bool operator== (const UNICODE *rhs) const
bool operator== (const FIXEDSTRING &rhs) const
bool operator> (const UNICODE *rhs) const
bool operator> (const FIXEDSTRING &rhs) const
bool operator>= (const UNICODE *rhs) const
bool operator>= (const FIXEDSTRING &rhs) const
void PadToEnd (char item)
void SetLowerCase ()
void SetUpperCase ()
void SwapBytes ()
void Terminate ()
void Truncate (size_t NewLength)
 ~FIXEDSTRING ()

Static Public Member Functions

size_t GetMaxSize ()

Detailed Description

template<size_t _CT>
class FIXEDSTRING< _CT >

Fixed-size array-based UNICODE string.

This class is designed to replace fixed size UNICODE 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.

Definition at line 152 of file fixedstr.h.


Constructor & Destructor Documentation

template<size_t _CT>
FIXEDSTRING< _CT >::FIXEDSTRING  )  [inline]
 

Default constructor, clears the string.

Definition at line 156 of file fixedstr.h.

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

Copy constructor.

Definition at line 160 of file fixedstr.h.

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

Copy constructor.

Parameters:
rhs  String to concatinate from

Definition at line 166 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING< _CT >::FIXEDSTRING const UNICODE string  )  [inline]
 

Construct from UNICODE string.

Definition at line 174 of file fixedstr.h.

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

Construct from MISTRING string.

Definition at line 182 of file fixedstr.h.

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

Construct from TEXTID.

Definition at line 190 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING< _CT >::~FIXEDSTRING  )  [inline]
 

Destructor.

Definition at line 195 of file fixedstr.h.


Member Function Documentation

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

Append from character string, not a constructor so that it is locatable in code.

Parameters:
name  Character string to append from

Definition at line 329 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Assign const UNICODE name,
size_t  len
[inline]
 

Assign from UNICODE string with a max length given.

Parameters:
name  UNICODE string to assign from

Definition at line 364 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Assign const char *  name,
CHAR_ENCODING  encoding
[inline]
 

Assign from character string, not a constructor so that it is locatable in code.

Parameters:
name  Character string to assign from
encoding  Encoding to use

Definition at line 349 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Assign const char *  name,
size_t  len
[inline]
 

Assign from character string, not a constructor so that it is locatable in code.

Parameters:
name  Character string to assign from

Definition at line 343 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Assign const char *  name  )  [inline]
 

Assign from character string, not a constructor so that it is locatable in code.

Parameters:
name  Character string to assign from

Definition at line 338 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Clear  )  [inline]
 

Clear the whole string.

Definition at line 370 of file fixedstr.h.

template<size_t _CT>
int FIXEDSTRING< _CT >::Compare const UNICODE str  )  const [inline]
 

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

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str  String to compare to

Definition at line 381 of file fixedstr.h.

template<size_t _CT>
int FIXEDSTRING< _CT >::Compare const FIXEDSTRING< _CT > &  str  )  const [inline]
 

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

Returns:
0 if strings equal, -1 if this < str, 1 if this > str.
Parameters:
str  String to compare to

Definition at line 375 of file fixedstr.h.

template<size_t _CT>
int FIXEDSTRING< _CT >::CompareNoCase const UNICODE 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

Definition at line 393 of file fixedstr.h.

template<size_t _CT>
int FIXEDSTRING< _CT >::CompareNoCase const FIXEDSTRING< _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

Definition at line 387 of file fixedstr.h.

template<size_t _CT>
ERRVALUE FIXEDSTRING< _CT >::GenerateUniqueName UNIQUENAMEFILTER FilterInst  )  [inline]
 

Generate an unique name based on the filter passed in.

String is already unique Initialize string and pointer for character replacement

Make sure rest of m_String is set to 0

Reset system and increment where

Reality check, if need to increase, it can be. 37 ^ 4 tried!

As far out a possible, retreat until a match is not found

Out of 37 ^ (_CT-1) possible combinations, none found

Definition at line 410 of file fixedstr.h.

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

Get string in specified encoding.

Returns:
Encoded string caller must free.
Parameters:
encoding  Encoding

Definition at line 461 of file fixedstr.h.

template<size_t _CT>
size_t FIXEDSTRING< _CT >::GetLength  )  const [inline]
 

Return length of string, not including terminator.

Definition at line 469 of file fixedstr.h.

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

Return maximum string size, not including terminator.

Definition at line 473 of file fixedstr.h.

template<size_t _CT>
const UNICODE* FIXEDSTRING< _CT >::GetReference  )  const [inline]
 

Return const string pointer, used for sprintf type parameters.

Definition at line 477 of file fixedstr.h.

template<size_t _CT>
const UNICODE* FIXEDSTRING< _CT >::GetTail int  maxlen  )  const [inline]
 

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

Definition at line 481 of file fixedstr.h.

template<size_t _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

Definition at line 491 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::IniWrite INIHANDLE  inih,
const char *  group,
const char *const   field
[inline]
 

Save the string to values in ini file.

Definition at line 498 of file fixedstr.h.

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

Find out if the string is empty.

Definition at line 486 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING< _CT >::operator const UNICODE *  )  const [inline]
 

Cast to <const UNICODE*>.

Definition at line 321 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator!= const UNICODE rhs  )  const [inline]
 

Inequality.

Definition at line 276 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator!= const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Inequality.

Definition at line 271 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator+= const UNICODE rhs  )  [inline]
 

Concatenate from UNICODE string.

Parameters:
rhs  String to concatinate from

Definition at line 253 of file fixedstr.h.

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

Concatenate operator.

Parameters:
rhs  String to concatinate from

Definition at line 245 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator< const UNICODE rhs  )  const [inline]
 

Less Than.

Definition at line 286 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator< const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Less Than.

Definition at line 281 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator<= const UNICODE rhs  )  const [inline]
 

Less Than or Equal to.

Definition at line 296 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator<= const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Less Than or Equal to.

Definition at line 291 of file fixedstr.h.

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

Assign from TEXTID.

Parameters:
textid  Message text ID

Definition at line 239 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator= const MISTRING rhs  )  [inline]
 

Assign from MISTRING string.

Parameters:
rhs  String to assign from

Definition at line 230 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator= const UNICODE rhs  )  [inline]
 

Assign from UNICODE string.

Parameters:
rhs  String to assign from

Definition at line 219 of file fixedstr.h.

template<size_t _CT>
template<int _T2>
FIXEDSTRING<_CT>& FIXEDSTRING< _CT >::operator= const FIXEDSTRING< _T2 > &  rhs  )  [inline]
 

Assignment operator.

Parameters:
rhs  String to concatinate from

Definition at line 210 of file fixedstr.h.

template<size_t _CT>
FIXEDSTRING& FIXEDSTRING< _CT >::operator= const FIXEDSTRING< _CT > &  rhs  )  [inline]
 

Assignment operator.

Parameters:
rhs  String to assign from

Definition at line 199 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator== const UNICODE rhs  )  const [inline]
 

Equality.

Definition at line 266 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator== const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Equality.

Definition at line 261 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator> const UNICODE rhs  )  const [inline]
 

Greater Than.

Definition at line 306 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator> const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Greater Than.

Definition at line 301 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator>= const UNICODE rhs  )  const [inline]
 

Greater Than or Equal to.

Definition at line 316 of file fixedstr.h.

template<size_t _CT>
bool FIXEDSTRING< _CT >::operator>= const FIXEDSTRING< _CT > &  rhs  )  const [inline]
 

Greater Than or Equal to.

Definition at line 311 of file fixedstr.h.

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

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

Definition at line 505 of file fixedstr.h.

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

Set the string to lower case letters.

Definition at line 513 of file fixedstr.h.

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

Set the string to upper case letters.

Definition at line 517 of file fixedstr.h.

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

Swap bytes of the string, used for RVC strings.

Definition at line 521 of file fixedstr.h.

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

Force termination of string at the end.

Definition at line 525 of file fixedstr.h.

template<size_t _CT>
void FIXEDSTRING< _CT >::Truncate size_t  NewLength  )  [inline]
 

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

Definition at line 529 of file fixedstr.h.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:19:44 2004 for TNTsdk by  doxygen 1.3.8-20040913