Public Types | |
enum | ELineFeed { kMacLineFeed, kUnixLineFeed, kWinLineFeed } |
Converts line feed (\r, \n or \r\n) to mac format \r. More... | |
Public Member Functions | |
virtual | ~TMCString (void) |
virtual TMCString & | operator= (const TMCString &ss) |
virtual TMCString & | operator+= (const TMCString &ss) |
virtual TMCString & | operator+= (uint16 c) |
virtual boolean | operator< (const TMCString &ss) const |
virtual boolean | operator> (const TMCString &ss) const |
virtual boolean | operator<= (const TMCString &ss) const |
virtual boolean | operator>= (const TMCString &ss) const |
virtual boolean | operator== (const TMCString &ss) const |
virtual boolean | operator!= (const TMCString &ss) const |
virtual void | InsertStr (const TMCString &ss, uint32 nIndex) |
boolean | EraseStr (uint32 nIndex, uint32 nCount) |
void | SubString (uint32 nIndex, uint32 nCount) |
uint32 | SearchStr (const TMCString &ss, uint32 nIndex=kStartIndex) const |
uint32 | ReplaceStr (const TMCString &ss, const TMCString &replace, uint32 nIndex=kStartIndex) |
uint32 | FindCharPos (uint16 c, uint32 nIndex=kStartIndex) const |
uint32 | FindCharPosFromRight (uint16 c) const |
uint32 | FindCharPosFromRight (uint16 c, uint32 nIndex) const |
const int8 * | StrGet (void) const |
uint32 | GetSubStringByteLength (uint32 inIndex, uint32 inLength) const |
uint32 | ByteLength (void) const |
uint32 | Length (void) const |
void | SetLength (uint32 inLength) |
void | SetCharAt (uint16 c, uint32 nIndex) |
uint16 | GetCharAt (uint32 nIndex) const |
void | ToCPtr (int8 *data) const |
void | ToPPtr (uint8 *data) const |
void | FromUTF8Ptr (const uint8 *data) |
void | ToUTF8Ptr (uint8 *data) const |
void | FromCPtr (const int8 *data) |
void | FromCAsciiPtr (const int8 *data) |
void | FromPPtr (const uint8 *data) |
void | FromEncodedPtr (const uint8 *data, ITranscoder *transcoder) |
void | FromUnicode (const uint16 *data) |
void | ToUnicode (uint16 *data, int32 dataSize) const |
void | FromText (const int8 *data, uint32 length) |
void | FromFourCharT (const FourCharT inCode, boolean inDontCheckValue) |
FourCharT | ToFourCharT (void) const |
boolean | IsEqualNotCaseSensitive (const TMCString &other) const |
int8 | CompareQuick (const TMCString &other) const |
void | ToUpper (void) |
void | ToLower (void) |
void | Capitalize (void) |
void | FromInt32 (int32 x) |
int32 | ToInt32 (void) const |
void | FromReal32 (real32 inValue, uint8 inDecimals) |
real32 | ToReal32 (void) const |
void | FromReal64 (real64 inValue, uint8 inPrecision) |
void | FromReal64 (real64 xx) |
real64 | ToReal64 (void) const |
boolean | IsNumericString (void) const |
uint16 | operator[] (uint32 inIndex) const |
void | TranslateAscii (boolean inverse) |
void | TranslateBeforeWrite (TMCString &translatedString) |
void | TranslateAfterRead (void) |
void | ConvertLineFeed (ELineFeed toType=kMacLineFeed) |
uint32 | MaxLength (void) const |
void | TranslateSBAfterRead (void) |
uint32 | SearchSBStr (const TMCString &ss, uint32 nIndex=kStartIndex) const |
uint32 | FindSBCharPos (int8 c, uint32 nIndex=kStartIndex) const |
int8 | GetSBCharAt (uint32 nIndex) const |
boolean | EraseSBStr (const uint32 nIndex, uint32 nCount) |
Protected Member Functions | |
TMCString (void) | |
void | Initialize (int8 *myData, uint32 maxLength, const int8 *ss, uint32 ll) |
void | SetSBCharAt (int8 c, int32 nIndex) |
virtual void | SetByteLength (uint32 byteLength) |
virtual void | SetMaxLength (uint32 maxLength) |
virtual int8 * | GetString () const =0 |
Protected Attributes | |
uint32 | fLength |
uint32 | fByteLength |
uint32 | fMaxLength |
TMCString is the base class from which all the different classes that represent strings are derived.
TMCString15, TMCString31, TMCString63, TMCString255 and TMCString1023 use a fix sized buffer (in bytes) to store their content.
On the other hand, TMCDynamicString reallocates its buffer whenever it needs to.
When the application is compiled in double byte mode (for asian systems), strings use characters that can be encoded over two bytes (but not every character is). The documentation precises which methods are "double byte aware".
enum TMCString::ELineFeed |
virtual TMCString::~TMCString | ( | void | ) | [inline, virtual] |
Virtual Destructor for clean destructions
TMCString::TMCString | ( | void | ) | [protected] |
uint32 TMCString::ByteLength | ( | void | ) | const [inline] |
Return the number of bytes used in this string.
void TMCString::Capitalize | ( | void | ) |
Make the string lowercase and then make the first character (if it is a letter) uppercase.
Compare this string to another disregarding the current language.
Returns negative if this is less than other.
Returns zero if this is equal to other.
Returns positive if this is greater than other.
void TMCString::ConvertLineFeed | ( | ELineFeed | toType = kMacLineFeed |
) |
Erase nCount characters from this string starting from nIndex.
Search forward for the location of character c in this, start the search at nIndex.
Search backwards for the location of character c in this, start the search at nIndex
Search backwards for the location of character c in this, start the search at the end of the string.
void TMCString::FromCAsciiPtr | ( | const int8 * | data | ) |
void TMCString::FromCPtr | ( | const int8 * | data | ) | [inline] |
Fill in this string from an existing c-style (NULL terminated) string.
void TMCString::FromEncodedPtr | ( | const uint8 * | data, | |
ITranscoder * | transcoder | |||
) |
Fill in this string from an exsiting NULL terminated string that is encoded with the given encoding
Assign string data from a FourCharT.
void TMCString::FromInt32 | ( | int32 | x | ) |
Fill in this string by convering the passed in value to a string.
void TMCString::FromPPtr | ( | const uint8 * | data | ) |
Fill in this string from an existing pascal-style (length prefixed) string.
Fill in this string by converting the passed in real32 to a string, using the number of decimals passed in.
void TMCString::FromReal64 | ( | real64 | xx | ) |
Fill in this string by convering the passed in value to a string.
Assign the character representation of the real64 value passed in with a %.pG print format (p= inPrecision)
Fill in this string from a memory buffer and a length.
void TMCString::FromUnicode | ( | const uint16 * | data | ) |
Fill in this string from an existing UCS (Unicode NULL terminated) string.
void TMCString::FromUTF8Ptr | ( | const uint8 * | data | ) | [inline] |
Fill in this string from an existing c-style (NULL terminated) string.
Retrieve the nIndex character of this string.
virtual int8* TMCString::GetString | ( | ) | const [protected, pure virtual] |
Implemented in TMCDynamicString.
Calculate the bytelength of a sub-string.
void TMCString::Initialize | ( | int8 * | myData, | |
uint32 | maxLength, | |||
const int8 * | ss, | |||
uint32 | ll | |||
) | [protected] |
Insert string ss at nIndex(1,String Length).
Reimplemented in TMCDynamicString.
Compare this string to another disregarding the case of the string.
boolean TMCString::IsNumericString | ( | void | ) | const |
Returns true if this string represents a numerical value, false otherwise.
uint32 TMCString::Length | ( | void | ) | const [inline] |
Return the number of characters in this string.
uint32 TMCString::MaxLength | ( | void | ) | const [inline] |
Reimplemented in TMCDynamicString.
Reimplemented in TMCDynamicString.
Reimplemented in TMCDynamicString.
Returns the character at inIndex position in the string.
uint32 TMCString::ReplaceStr | ( | const TMCString & | ss, | |
const TMCString & | replace, | |||
uint32 | nIndex = kStartIndex | |||
) |
Replace each occurence of ss by replace, start the search at nIndex. Return the number of occurence replaced.
Return the location of string ss in this, start the search at nIndex.
virtual void TMCString::SetByteLength | ( | uint32 | byteLength | ) | [protected, virtual] |
Reimplemented in TMCDynamicString.
Assign c to the nIndex character of this string.
void TMCString::SetLength | ( | uint32 | inLength | ) |
Set the number of characters in this string.
virtual void TMCString::SetMaxLength | ( | uint32 | maxLength | ) | [inline, protected, virtual] |
Reimplemented in TMCDynamicString.
void TMCString::SetSBCharAt | ( | int8 | c, | |
int32 | nIndex | |||
) | [protected] |
const int8* TMCString::StrGet | ( | void | ) | const |
Return a const pointer to the string data contained in this string.
Make this string into a substring consisting of nCount characters starting at nIndex.
void TMCString::ToCPtr | ( | int8 * | data | ) | const |
Fill in data as a c-style (NULL terminated) copy of this string.
FourCharT TMCString::ToFourCharT | ( | void | ) | const |
Convert string to a FourCharT.
int32 TMCString::ToInt32 | ( | void | ) | const |
Return this string as an int32 value.
void TMCString::ToLower | ( | void | ) |
Convert the contents of this string to lower case.
void TMCString::ToPPtr | ( | uint8 * | data | ) | const |
Fill in data as a pascal-style (length prefixed) copy of this string.
real32 TMCString::ToReal32 | ( | void | ) | const |
Return this string as a real32 value.
real64 TMCString::ToReal64 | ( | void | ) | const |
Return this string as a double value.
void TMCString::ToUnicode | ( | uint16 * | data, | |
int32 | dataSize | |||
) | const |
Fill in data as a UCS (Unicode NULL terminated) copy of this string.
void TMCString::ToUpper | ( | void | ) |
Convert the contents of this string to upper case.
void TMCString::ToUTF8Ptr | ( | uint8 * | data | ) | const |
Fill in data as a UTF-8 encoded (NULL terminated) copy of this string.
void TMCString::TranslateAfterRead | ( | void | ) |
void TMCString::TranslateAscii | ( | boolean | inverse | ) |
void TMCString::TranslateBeforeWrite | ( | TMCString & | translatedString | ) |
void TMCString::TranslateSBAfterRead | ( | void | ) |
uint32 TMCString::fByteLength [protected] |
uint32 TMCString::fLength [protected] |
uint32 TMCString::fMaxLength [protected] |