![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This class provides a 'Key' wrapper for a array of Character of length N, i.e. More...
This class provides a 'Key' wrapper for a array of Character of length N, i.e.
a string that is NOT null terminated. Keys of this type can used to compare against other KeyStringBuffer, KeyLiteralString, or Items that use a Cpl::Text::String as their key
#include <Key.h>
Public Member Functions | |
| KeyStringBuffer (const char *startOfString, size_t lenOfStringInBytes) | |
| Constructor. | |
| const char * | getKeyValue (size_t &lenOfStringInBytes) const noexcept |
| Returns the Key's content value. | |
| int | compareKey (const Key &key) const |
| Key Compare function. | |
| const void * | getRawKey (unsigned *returnRawKeyLenPtr=0) const |
| Returns the object's length (in bytes) and point to the start of key data. | |
Public Member Functions inherited from Cpl::Container::Key | |
| virtual | ~Key () |
| Ensure a Virtual destructor. | |
Static Public Member Functions | |
| static int | compare (const char *myString, unsigned myLen, const char *otherString, unsigned otherLen) |
| Generic compare function for strings and string buffers. | |
Public Attributes | |
| const char * | m_stringKeyPtr |
| Storage for the key. | |
| size_t | m_len |
| Number of bytes in the buffer. | |
| Cpl::Container::KeyStringBuffer::KeyStringBuffer | ( | const char * | startOfString, |
| size_t | lenOfStringInBytes ) |
Constructor.
|
static |
Generic compare function for strings and string buffers.
Key Compare function.
Returns <0, 0, >0 if this key is less than, equal, or greater than respectively to the specified key! The actual type of the 'key' is up to the client sub-class that implements this interface. It is the responsibility of the sub-class to correctly define/interpret the data type of the key.
Implements Cpl::Container::Key.
|
inlinenoexcept |
Returns the Key's content value.
Note: The returned values is NOT a null terminated string!
|
virtual |
Returns the object's length (in bytes) and point to the start of key data.
If 'returnRawKeyLenPtr' is null, then no length is returned.
Implements Cpl::Container::Key.
| size_t Cpl::Container::KeyStringBuffer::m_len |
Number of bytes in the buffer.