#include <SIBCString.h>
Public Member Functions |
|
| CSIBCString () | |
| CSIBCString (const CSIBCString &in_pString) | |
| CSIBCString (const SI_Char *in_pString) | |
| SI_Int | GetLength () |
| SI_Char * | GetText () |
| void | Clear () |
| SI_Error | Concat (CSIBCString *in_pString) |
| SI_Error | Concat (const SI_Char *in_pString) |
| SI_Error | Concat (const SI_Int in_lInt) |
| SI_Error | Concat (const SI_Float in_fFloat) |
| SI_Error | SetText (CSIBCString *in_pString) |
| SI_Error | SetText (const SI_Char *in_pString) |
| SI_Error | SetText (const SI_Int in_lInt) |
| SI_Error | SetText (const SI_Float in_fFloat) |
| SI_Int | Compare (CSIBCString *in_pString) |
| SI_Int | Compare (const SI_Char *in_pString) |
| SI_Int | Compare (const SI_Int in_lInt) |
| SI_Int | Compare (const SI_Float in_fFloat) |
| SI_Error | LowerCase () |
| SI_Error | UpperCase () |
| SI_Error | RemoveIllegalXSICharacters () |
| SI_Bool | IsXSILegalName () |
| CSIBCString & | operator= (const CSIBCString &i_pString) |
| CSIBCString & | operator= (const SI_Char *i_pString) |
| bool | operator== (CSIBCString &i_pString) |
| bool | operator== (const SI_Char *i_pString) |
| bool | operator!= (CSIBCString &i_pString) |
| void | Dump () |
| SI_UInt | UsedMemory () |
| SI_UInt | AllocatedMemory () |
This class is used throughout the FTK as a standard method in dealing with strings. The strings are NULL-terminated strings. It supports many methods that perform useful string operations.
| CSIBCString | ( | const CSIBCString & | in_pString | ) |
Copy Constructor. Constructs a string idential to in_pString
| in_pString | String to duplicate. Must not be of zero length. |
| CSIBCString | ( | const SI_Char * | in_pString | ) |
Constructor Constructs a string object containing the NULL-terminated character string pointer to by in_pString.
| in_pString | Pointer to the string to use for the new string. Cannot be NULL. |
Returns a character buffer with the contents of the string. This buffer should not be modified, and does not need to be freed after use. This function is generally used to output the text contained within the string.
SIBCString * t_pMyString = new SIBCString("FTK"); // This is OK. printf("I think that %s is the best!\n", t_pMyString->GetText()); // This is wrong. printf("I think that %s is the best!\n", t_pMyString);
Deletes the internal character buffer of the string, and sets the length to zero.
Concatenate in_pString to the end of this string.
| in_pString | Pointer to the string to concatenate. |
| SI_Error Concat | ( | const SI_Char * | in_pString | ) |
Concatenate in_pString to the end of this string.
| in_pString | Pointer to a character buffer to concatenate. |
| SI_Error Concat | ( | const SI_Int | in_lInt | ) |
Concatenate in_lInt to the end of this string, in string format.
| in_lInt | Integer to concatenate to the end of this string. |
Example:
SIBCString * t_pMyString = SIBCString("FTK v"); t_pMyString->Concat(3); t_pMyString->Concat("."); t_pMyString->Concat(6); printf("This is %s\n", t_pMyString.GetText()); // output is "This is FTK v3.6"
| SI_Error Concat | ( | const SI_Float | in_fFloat | ) |
Concatenate in_fFloat to the end of this string, in string format.
| in_fFloat | Floating-point number to concatenate to the end of this string. |
Example:
SIBCString * t_pMyString = SIBCString("FTK v"); t_pMyString->Concat(3.6f); printf("This is %s\n", t_pMyString.GetText()); // output is "This is FTK v3.6"
Assigns the value contained in the string in_pString to this string.
| in_pString | String containing data to assign to this string. |
| SI_Error SetText | ( | const SI_Char * | in_pString | ) |
Assigns the NULL-terminated string contained in the character buffer in_pString to this string.
| in_pString | Pointer to the character buffer containing the NULL-terminated string to assign. |
| SI_Error SetText | ( | const SI_Int | in_lInt | ) |
Assigns the string representation of in_lInt to this string.
| in_lInt | Integer whose string representation should be assigned to this string |
| SI_Error SetText | ( | const SI_Float | in_fFloat | ) |
Assigns the string representation of in_fFloat to this string.
| in_fFloat | Floating-point number whose string representation should be assigned to this string |
Returns a value indicated the differences between this string and in_pString.
| in_pString | The string to compare this string with. |
in_pString. Negative indicates this string is less than in_pString, Positive indicates this string is greater than in_pString, and zero indicates the strings are the same.in_pString and this string's buffer are both NULL, function returns 0
in_pString is NULL, and this string's buffer is not NULL, function returns 1.
in_pString is not NULL, and this strings's buffer is NULL, function returns -1.
| SI_Int Compare | ( | const SI_Char * | in_pString | ) |
Returns a value indicated the differences between this string and in_pString.
| in_pString | The character buffer containing the NULL-terminated string to compare this string with. |
in_pString. Negative indicates this string is less than in_pString, Positive indicates this string is greater than in_pString, and zero indicates the strings are the same.in_pString and this string's buffer are both NULL, function returns 0
in_pString is NULL, and this string's buffer is not NULL, function returns 1.
in_pString is not NULL, and this strings's buffer is NULL, function returns -1.
| SI_Int Compare | ( | const SI_Int | in_lInt | ) |
Returns a value indicated the differences between this string and the string representation of in_lInt.
| in_lInt | The integer value whose string representation is compared with this string. |
in_lInt. Negative indicates this string is less than that string, positive indicates this string is greater than that string, and zero indicates the strings are the same. | SI_Int Compare | ( | const SI_Float | in_fFloat | ) |
Returns a value indicated the differences between this string and the string representation of in_fFloat.
| in_lInt | The floating-pointer number whose string representation is compared with this string. |
in_fFloat. Negative indicates this string is less than that string, positive indicates this string is greater than that string, and zero indicates the strings are the same. Converts all alphabetic characters contained within this string to lower-case characters.
Converts all alphabetic characters contained within this string to upper-case characters.
Remove all characters considered illegal by XSI
Returns wether the string is a legal XSI name
Assignment operator. Copies the value of i_pString into this string.
| i_pString | String whose value is copied into this string. |
| CSIBCString& operator= | ( | const SI_Char * | i_pString | ) |
Assignment operator. Copies the value of i_pString into this string.
| i_pString | Pointer to the character buffer containing a NULL-terminated string whose value is copied into this string. |
Equality operator. Determines whether i_pString and this string contain the same text.
| i_pString | Reference to the string to compare to. |
| bool operator== | ( | const SI_Char * | i_pString | ) |
Equality operator. Determines whether i_pString and this string contain the same text.
| i_pString | Pointer to the character buffer containing the NULL-terminated string to compare to. |
Inequality operator. Determines whether i_pString and this string contain different text.
| i_pString | Reference to the string to compare to. |
Output debugging information for this string. This includes the address of the string, the length and contents of the string buffer.
Returns the amount of memory used by the string. This does not include the size of the SIBCString class, only the data contained in its character buffer. In SIBCString (but not necessarily in other classes) SIBCString::UsedMemory is equivalent to SIBCString::AllocatedMemory.
Returns the amount of memory allocated by the string. This does not include the size of the SIBCString class, only the data contained in its character buffer. In SIBCString (but not necessarily in other classes) SIBCString::AllocatedMemory is equivalent to SIBCString::UsedMemory.