![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class is a mix of FString and a DString - the initial memory is dynamically allocated - but no additional memory allocation will occur after the instance is created, i.e. More...
This concrete class is a mix of FString and a DString - the initial memory is dynamically allocated - but no additional memory allocation will occur after the instance is created, i.e.
it is a 'non-template' version - so to speak - of an FString.
NOTE: See base class - String - for a complete listing/description of the class's methods.
#include <DFString.h>
Public Member Functions | |
| DFString (void) | |
| Constructor. The 'memsize' defaults to OPTION_CPL_TEXT_DFSTRING_ALLOC_BLOCK_SIZE - 1. | |
| DFString (const DFString &string) | |
| Constructor. The new instance uses the 'memSize' of 'string'. | |
| DFString (const Cpl::Text::String &string) | |
| Constructor. The new instance uses the 'memSize' of 'string'. | |
| DFString (size_t memSize, const DFString &string) | |
| Constructor. 'memSize' is the max length of the string storage WITHOUT the null terminator. If 'memSize' is zero, the storage is defaulted to OPTION_CPL_TEXT_DFSTRING_ALLOC_BLOCK_SIZE - 1. | |
| DFString (size_t memSize, const Cpl::Text::String &string) | |
| Constructor. | |
| DFString (size_t memSize, const char *string="") | |
| Constructor. | |
| DFString (size_t memSize, char c) | |
| Constructor. | |
| DFString (size_t memSize, int num) | |
| Constructor. | |
| DFString (size_t memSize, unsigned num) | |
| Constructor. | |
| DFString (size_t memSize, long num) | |
| Constructor. | |
| DFString (size_t memSize, long long num) | |
| Constructor. | |
| DFString (size_t memSize, unsigned long num) | |
| Constructor. | |
| DFString (size_t memSize, unsigned long long num) | |
| Constructor. | |
| ~DFString () | |
| Destructor. | |
| Cpl::Text::String & | operator= (const DFString &string) |
| Append. | |
| Cpl::Text::String & | operator+= (const DFString &string) |
| Append. | |
Public Member Functions inherited from Cpl::Text::FString_ | |
| void | copyIn (const char *string, int n) |
| see Cpl::Text::String | |
| void | appendTo (const char *string, int n) |
| see Cpl::Text::String | |
| void | insertAt (int insertOffset, const char *stringToInsert) |
| see Cpl::Text::String | |
| int | maxLength () const |
| see Cpl::Text::String | |
| Cpl::Text::String & | operator= (int num) |
| Assignment. | |
| Cpl::Text::String & | operator= (unsigned int num) |
| Assignment. | |
| Cpl::Text::String & | operator= (long num) |
| Assignment. | |
| Cpl::Text::String & | operator= (long long num) |
| Assignment. | |
| Cpl::Text::String & | operator= (unsigned long num) |
| Assignment. | |
| Cpl::Text::String & | operator= (unsigned long long num) |
| Assignment. | |
| Cpl::Text::String & | operator+= (int num) |
| Append. | |
| Cpl::Text::String & | operator+= (unsigned int num) |
| Append. | |
| Cpl::Text::String & | operator+= (long num) |
| Append. | |
| Cpl::Text::String & | operator+= (long long num) |
| Append. | |
| Cpl::Text::String & | operator+= (unsigned long num) |
| Append. | |
| Cpl::Text::String & | operator+= (unsigned long long num) |
| Append. | |
Public Member Functions inherited from Cpl::Text::String_ | |
| void | clear () |
| See Cpl::Text::String. | |
| operator char () const | |
| See Cpl::Text::String. | |
| int | length () const |
| See Cpl::Text::String. | |
| bool | isEmpty () const |
| See Cpl::Text::String. | |
| bool | truncated () const |
| See Cpl::Text::String. | |
| bool | operator== (const char *string) const |
| See Cpl::Text::String. | |
| bool | operator== (const String &string) const |
| See Cpl::Text::String. | |
| bool | operator!= (const char *string) const |
| See Cpl::Text::String. | |
| bool | operator!= (const String &string) const |
| See Cpl::Text::String. | |
| bool | isEqualIgnoreCase (const char *string) const |
| See Cpl::Text::String. | |
| int | compare (const char *string) const |
| See Cpl::Text::String. | |
| int | compareIgnoreCase (const char *string) const |
| See Cpl::Text::String. | |
| bool | operator== (char c) const |
| See Cpl::Text::String. | |
| bool | isEqualSubstring (int startpos, int endpos, const char *string) const |
| See Cpl::Text::String. | |
| bool | isEqualSubstringIgnoreCase (int startpos, int endpos, const char *string) const |
| See Cpl::Text::String. | |
| bool | startsWith (const char *string) const |
| See Cpl::Text::String. | |
| bool | startsWith (const char *string, int startOffset) const |
| See Cpl::Text::String. | |
| bool | endsWith (const char *string) const |
| See Cpl::Text::String. | |
| void | format (const char *format,...) |
| See Cpl::Text::String. | |
| void | formatAppend (const char *format,...) |
| See Cpl::Text::String. | |
| void | formatOpt (bool appendFlag, const char *format,...) |
| See Cpl::Text::String. | |
| void | vformat (const char *format, va_list ap) |
| See Cpl::Text::String. | |
| void | vformatAppend (const char *format, va_list ap) |
| See Cpl::Text::String. | |
| void | vformatOpt (bool appendFlag, const char *format, va_list ap) |
| See Cpl::Text::String. | |
| int | indexOf (char c) const |
| See Cpl::Text::String. | |
| int | indexOf (char c, int startpos) const |
| See Cpl::Text::String. | |
| int | indexOf (const char *str) const |
| See Cpl::Text::String. | |
| int | indexOf (const char *str, int startpos) const |
| See Cpl::Text::String. | |
| int | lastIndexOf (char c) const |
| See Cpl::Text::String. | |
| int | count (char c) const |
| See Cpl::Text::String. | |
| const char * | toUpper () |
| See Cpl::Text::String. | |
| const char * | toLower () |
| See Cpl::Text::String. | |
| void | removeLeadingSpaces () |
| See Cpl::Text::String. | |
| void | removeTrailingSpaces () |
| See Cpl::Text::String. | |
| void | removeLeadingChars (const char *charsSet) |
| See Cpl::Text::String. | |
| void | removeTrailingChars (const char *charsSet) |
| See Cpl::Text::String. | |
| void | cut (int startpos, int endpos) |
| See Cpl::Text::String. | |
| void | trimRight (int n) |
| See Cpl::Text::String. | |
| void | setChar (int atPosition, char newchar) |
| See Cpl::Text::String. | |
| int | replace (char targetChar, char newChar) |
| See Cpl::Text::String. | |
| const char * | getString () const |
| See Cpl::Text::String. | |
| char * | getBuffer (int &maxAllowedLength) |
| See Cpl::Text::String. | |
| Cpl::Text::String & | operator= (const String &string) |
| Assignment. | |
| Cpl::Text::String & | operator= (const char *string) |
| Assignment. | |
| Cpl::Text::String & | operator= (char c) |
| Assignment. | |
| Cpl::Text::String & | operator+= (const String &string) |
| Append. | |
| Cpl::Text::String & | operator+= (const char *string) |
| Append. | |
| Cpl::Text::String & | operator+= (char c) |
| Append. | |
| int | compareKey (const Key &key) const |
| See Cpl::Container::Key. | |
| const void * | getRawKey (unsigned *returnRawKeyLenPtr=0) const |
| See Cpl::Container::Key. | |
Public Member Functions inherited from Cpl::Text::String | |
| virtual | ~String () |
| Virtual destructor! | |
| operator const char * () const | |
| Cast to read-only character string pointer. | |
| const char * | operator() () const |
| Returns a Read-only pointer to the "raw" (short-hand for getString()) | |
| char | operator[] (int i) const |
| Returns the specified character. If n is out-bounds, then '\0' is returned. | |
| int | availLength () |
| Returns the available space left in the internal buffer. | |
| void | trimLeft (int n) |
| Removes 'n' characters from the start-of-string. | |
Public Member Functions inherited from Cpl::Container::Key | |
| virtual | ~Key () |
| Ensure a Virtual destructor. | |
| virtual int | compareKey (const Key &key) const =0 |
| Key Compare function. | |
Protected Member Functions | |
| int | calcMemSize (int len) |
| Returns the need memory size in "block units". | |
Protected Member Functions inherited from Cpl::Text::FString_ | |
| FString_ (const char *string, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (char c, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (int num, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (unsigned num, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (long num, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (long long num, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (unsigned long num, char *internalString, int maxLen) | |
| Constructor. | |
| FString_ (unsigned long long num, char *internalString, int maxLen) | |
| Constructor. | |
Protected Member Functions inherited from Cpl::Text::String_ | |
| String_ (char *internalStringPtr) | |
| Constructor. | |
| void | validateSizeAfterFormat (int availableLen, int formattedLen, int maxlen) |
| Sets the truncated flag if needed and insures string is null terminated. | |
Additional Inherited Members | |
Protected Attributes inherited from Cpl::Text::FString_ | |
| int | m_internalMaxlen |
| Maximum length of the internal string (not including the null terminator) | |
Protected Attributes inherited from Cpl::Text::String_ | |
| bool | m_truncated |
| Flag to track when the internal string get truncated. | |
| char * | m_strPtr |
| Pointer to the actual internal string. | |
Static Protected Attributes inherited from Cpl::Text::FString_ | |
| static char | m_noMemory [1] |
| Empty string that is used to return a 'string' when my internal string is not valid. | |
| Cpl::Text::DFString::DFString | ( | void | ) |
Constructor. The 'memsize' defaults to OPTION_CPL_TEXT_DFSTRING_ALLOC_BLOCK_SIZE - 1.
| Cpl::Text::DFString::DFString | ( | const DFString & | string | ) |
Constructor. The new instance uses the 'memSize' of 'string'.
| Cpl::Text::DFString::DFString | ( | const Cpl::Text::String & | string | ) |
Constructor. The new instance uses the 'memSize' of 'string'.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| const DFString & | string ) |
Constructor. 'memSize' is the max length of the string storage WITHOUT the null terminator. If 'memSize' is zero, the storage is defaulted to OPTION_CPL_TEXT_DFSTRING_ALLOC_BLOCK_SIZE - 1.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| const Cpl::Text::String & | string ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| const char * | string = "" ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| char | c ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| int | num ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| unsigned | num ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| long | num ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| long long | num ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| unsigned long | num ) |
Constructor.
| Cpl::Text::DFString::DFString | ( | size_t | memSize, |
| unsigned long long | num ) |
Constructor.
| Cpl::Text::DFString::~DFString | ( | ) |
Destructor.
|
inlineprotected |
Returns the need memory size in "block units".
Note: The size calculation includes the memory for the trailing '\0' string terminator.
| Cpl::Text::String & Cpl::Text::DFString::operator+= | ( | const DFString & | string | ) |
Append.
| Cpl::Text::String & Cpl::Text::DFString::operator= | ( | const DFString & | string | ) |
Append.