*/
const char* getData() const;
+ /**
+ Returns a pointer to the character buffer with the Buffer contents.
+ This function does NOT append a null character.
+ Resulting data should NOT be used with C string processing functions.
+ */
+ char* getContentPtr();
+
char get(Uint32 i) const;
void set(Uint32 i, char x);
return _rep->data;
}
+inline char* Buffer::getContentPtr()
+{
+ return _rep->data;
+}
+
inline char Buffer::get(Uint32 i) const
{
return _rep->data[i];
// avoids creation of an empty buffer getting build
if (_size > 0)
{
- Node* data = (Node*) _array.getData();
+ Node* data = (Node*) _array.getContentPtr();
for (Uint32 i = 0; i < _size; i++)
{
memset((*_table), 0, sizeof(Node*) * N);
if (_size > 0)
{
- Node* data = (Node*) _array.getData();
+ Node* data = (Node*) _array.getContentPtr();
for (Uint32 i = 0; i < _size; i++)
{
// Now add to hash table
{
- Node* data = (Node*) _array.getData();
+ Node* data = (Node*) _array.getContentPtr();
(*_table)[code] = &data[_size];
}
// Remove node from array (dynamic, ordered list)
{
- Node* node = (Node*) _array.getData() + index;
+ Node* node = (Node*) _array.getContentPtr() + index;
node->rep->decreaseOwnerCount();
node->rep->Dec();
_array.remove(index * Uint32(sizeof(Node)), Uint32(sizeof(Node)));
if (index >= _size)
throw IndexOutOfBoundsException();
- const Node* node = (const Node*) _array.getData() + index;
+ const Node* node = (const Node*) _array.getContentPtr() + index;
return *const_cast<T*>(reinterpret_cast<const T*>(node));
}
current state of the dynamic, ordered list
*/
memset((*_table), 0, sizeof(Node*) * N);
- Node* data = (Node*) _array.getData();
+ Node* data = (Node*) _array.getContentPtr();
for (Uint32 i = 0; i < _size; i++)
{