zeus::IString Class Reference

#include <IString.hpp>

Inheritance diagram for zeus::IString:

zeus::IValueType zeus::TString

List of all members.

Public Member Functions

virtual const wchar_t *MQUALIFIER c_bstr () const =0
virtual const char *MQUALIFIER c_str (bool *pError) const =0
virtual Float64 MQUALIFIER toFloat (Float64 dPreDef=0.0, bool *pbError=NULL) const =0
virtual Int32 MQUALIFIER toInt (Int32 lPreDef=0, bool *pbError=NULL) const =0
virtual Uint MQUALIFIER toUint (Uint uiPredef=0, bool *pbError=NULL) const =0
virtual Timeval MQUALIFIER toTimeval (Timeval tmPredef=0, bool *pbError=NULL) const =0
virtual bool MQUALIFIER toBool (bool bPredef=false, bool *pbError=NULL) const =0
virtual bool MQUALIFIER isFloat () const =0
virtual bool MQUALIFIER isInt () const =0
virtual bool MQUALIFIER isBool () const =0
virtual bool MQUALIFIER equals (const wchar_t *pInbuffer, bool bIgnoreCase=false) const =0
virtual bool MQUALIFIER equalsStr (const IString &rInstr, bool bIgnoreCase=false) const =0
virtual void MQUALIFIER concat (const wchar_t *pInbuffer)=0
virtual void MQUALIFIER concatStr (const IString &rInstr)=0
virtual void MQUALIFIER assign (const wchar_t *pInbuffer)=0
virtual void MQUALIFIER assignStr (const IString &rInstr)=0
virtual Int MQUALIFIER getSize () const =0
virtual wchar_t MQUALIFIER getChar (Int iIndex) const =0
virtual Int MQUALIFIER getFirstPos (const wchar_t *pSubBuffer) const =0
virtual Int MQUALIFIER getFirstPosStr (const IString &rSubString) const =0
virtual Int MQUALIFIER getLastPos (const wchar_t *pSubBuffer) const =0
virtual Int MQUALIFIER getLastPosStr (const IString &rSubString) const =0
virtual void MQUALIFIER clear ()=0
virtual bool MQUALIFIER isEmpty () const =0
virtual bool MQUALIFIER endsWith (const wchar_t *pString) const =0
virtual bool MQUALIFIER endsWithStr (const IString &rString) const =0
virtual bool MQUALIFIER startsWith (const wchar_t *pString) const =0
virtual bool MQUALIFIER startsWithStr (const IString &rString) const =0
virtual Int MQUALIFIER compareTo (const IString &rString) const =0
virtual bool MQUALIFIER contains (const wchar_t *pSubString) const =0
virtual bool MQUALIFIER containsStr (const IString &rSubString) const =0

Friends

class TStringList
class TZVariant


Detailed Description

This interface defines a wide string for C++. It is used to wrapp a unicode string. There are converter methods for regular 8bit strings, numbers and float values. The string is NULL terminated, which means the last character is a NULL-character to mark the end of the string

Member Function Documentation

virtual const wchar_t* MQUALIFIER zeus::IString::c_bstr (  )  const [pure virtual]

returns the wide array as wchar_t-array

Returns:
wide array

Implemented in zeus::TString.

virtual const char* MQUALIFIER zeus::IString::c_str ( bool *  pError  )  const [pure virtual]

Returns the 8bit array. This array must be converted from the 16bit. If the converting fails (for wide characters) this will place a '?' at the failure position. There is a optional bool to capture the convertion error.

Parameters:
pError [OUT]: Returns if any character could not be converted without loss of information. For example, real Chinese characters can not be converted to single byte Ansi characters.
Returns:
: 8bit array

Implemented in zeus::TString.

virtual Float64 MQUALIFIER zeus::IString::toFloat ( Float64  dPreDef = 0.0,
bool *  pbError = NULL 
) const [pure virtual]

this method converts a string into a float value

Parameters:
dPreDef [IN] : Default value
pbError [OUT]: Optional bool to capture convertion errors
Returns:
value

virtual Int32 MQUALIFIER zeus::IString::toInt ( Int32  lPreDef = 0,
bool *  pbError = NULL 
) const [pure virtual]

This method converts a string into a int value

Parameters:
lPreDef [IN] : Default value
pbError [OUT]: Optional bool to capture convertion errors
Returns:
value

virtual Uint MQUALIFIER zeus::IString::toUint ( Uint  uiPredef = 0,
bool *  pbError = NULL 
) const [pure virtual]

this method converts a string into a unsigned int value

Parameters:
ulPredef [IN] : Default value
pbError [OUT]: Optional bool to capture convertion errors
Returns:
value

Implemented in zeus::TString.

virtual Timeval MQUALIFIER zeus::IString::toTimeval ( Timeval  tmPredef = 0,
bool *  pbError = NULL 
) const [pure virtual]

this method converts a string into a time value, which is preset to be 64bit

Parameters:
tmPredef [IN] : Default value
pbError [OUT]: Optional bool to capture convertion errors
Returns:
value

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::toBool ( bool  bPredef = false,
bool *  pbError = NULL 
) const [pure virtual]

This method converts a string into a boolean value

Parameters:
bPredef [IN] : Default value
pbError [OUT]: Optional bool to capture conversion errors
Returns:
value

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::isFloat (  )  const [pure virtual]

Checks if the string can be converted into a float value

Return values:
true : content is a float
false,: content is not a float

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::isInt (  )  const [pure virtual]

Checks if the string can be converted into a int value (o unsigned int)

Return values:
true : content is a int (or unsigned int)
false,: content is not a number

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::isBool (  )  const [pure virtual]

Checks if the string can be converted into a boolean value

Return values:
true : content is a boolean
false,: content is not a boolean

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::equals ( const wchar_t *  pInbuffer,
bool  bIgnoreCase = false 
) const [pure virtual]

Checks if the string content is equal with a wide character array.

Parameters:
pInbuffer : array to check
bIgnoreCase : If this falg is set the case will be ignored
Return values:
true : Content is equal
false,: Inhalte is different

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::equalsStr ( const IString rInstr,
bool  bIgnoreCase = false 
) const [pure virtual]

Checks if the string content is equal with an other string object

Parameters:
rInstr : String to check
bIgnoreCase : If this falg is set the case will be ignored
Return values:
true : Content is equal
false,: Inhalte is different

Implemented in zeus::TString.

virtual void MQUALIFIER zeus::IString::concat ( const wchar_t *  pInbuffer  )  [pure virtual]

Concats a wide array at the end of the string

Parameters:
pInbuffer : Wide array to add

Implemented in zeus::TString.

virtual void MQUALIFIER zeus::IString::concatStr ( const IString rInstr  )  [pure virtual]

concats an other string object at the end of the string

Parameters:
rInstr : String to add

Implemented in zeus::TString.

virtual void MQUALIFIER zeus::IString::assign ( const wchar_t *  pInbuffer  )  [pure virtual]

assigns a wide array into the string. The old string buffer will be overwritten using this method.

Parameters:
pInbuffer : wide array to assign

Implemented in zeus::TString.

virtual void MQUALIFIER zeus::IString::assignStr ( const IString rInstr  )  [pure virtual]

assigns a string content to this string.

Parameters:
rInstr : String to assign

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::getSize (  )  const [pure virtual]

returns the string size (without the NULL-character).

Returns:
string size

Implemented in zeus::TString.

virtual wchar_t MQUALIFIER zeus::IString::getChar ( Int  iIndex  )  const [pure virtual]

Returns an indexed wide character of the string. If the index is out of the array bound, this will return a NULL character

Parameters:
iIndex : Index of the character
Returns:
Indexed character

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::getFirstPos ( const wchar_t *  pSubBuffer  )  const [pure virtual]

returns the index of the first substring found in the string

Parameters:
pSubBuffer : wide character array as substring
Return values:
-1 : Substring not found
>= 0 : Index of substring

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::getFirstPosStr ( const IString rSubString  )  const [pure virtual]

returns the index of the first substring found in the string

Parameters:
rSubString : substring
Return values:
-1 : Substring not found
>= 0 : Index of substring

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::getLastPos ( const wchar_t *  pSubBuffer  )  const [pure virtual]

returns the index of the last substring found in the string

Parameters:
pSubBuffer : wide character array as substring
Return values:
-1 : Substring not found
>= 0 : Index of substring

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::getLastPosStr ( const IString rSubString  )  const [pure virtual]

returns the index of the last substring found in the string

Parameters:
rSubString : substring
Return values:
-1 : Substring not found
>= 0 : Index of substring

Implemented in zeus::TString.

virtual void MQUALIFIER zeus::IString::clear (  )  [pure virtual]

Empties / clears a string.

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::isEmpty (  )  const [pure virtual]

Checks if a string is empty

Return values:
true : String is empty (same as strData->equals(L"") but faster.
false : String contains data

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::endsWith ( const wchar_t *  pString  )  const [pure virtual]

Checks if the string ends with the substring pString

Parameters:
pString : String to check
Return values:
true : String ends with this sub string
false,: String does not end with this substring

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::endsWithStr ( const IString rString  )  const [pure virtual]

Checks if the string ends with the substring rString

Parameters:
rString : String to check
Return values:
true : String ends with this sub string
false,: String does not end with this substring

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::startsWith ( const wchar_t *  pString  )  const [pure virtual]

Checks if the string starts with the substring pString

Parameters:
pString : String to check
Return values:
true : String starts with this sub string
false,: String does not start with this substring

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::startsWithStr ( const IString rString  )  const [pure virtual]

Checks if the string starts with the substring rString

Parameters:
rString : String to check
Return values:
true : String starts with this sub string
false,: String does not start with this substring

Implemented in zeus::TString.

virtual Int MQUALIFIER zeus::IString::compareTo ( const IString rString  )  const [pure virtual]

Compares two strings lexicographically. The lexicographically compare depends on the locale. This takes the default locale

Parameters:
rString : String to compare with
Return values:
0 : Strings are equal
-1,: this string is smaller than the rString
1 : this string is bigger than the rString

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::contains ( const wchar_t *  pSubString  )  const [pure virtual]

Returns true if the string contains a substring

Parameters:
pSubString : Substring to check
Return values:
true : Substring is contained
false,: no such substring found

Implemented in zeus::TString.

virtual bool MQUALIFIER zeus::IString::containsStr ( const IString rSubString  )  const [pure virtual]

Returns true if the string contains a substring

Parameters:
rSubString : Substring to check
Return values:
true : Substring is contained
false,: no such substring found

Implemented in zeus::TString.


Friends And Related Function Documentation

friend class TStringList [friend]

friend class TZVariant [friend]


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:34 2009