Rudiments
|
Inherits nodecollection< valuetype >.
Inherited by linkedlist< valuetype >, and singlylinkedlist< valuetype >.
Public Member Functions | |
listcollection () | |
listcollection (nodecollection< valuetype > &n) | |
virtual const char * | getType () |
virtual void | prepend (valuetype value)=0 |
virtual void | prepend (valuetype *values, uint64_t count) |
virtual void | prepend (listnode< valuetype > *node)=0 |
virtual void | append (valuetype value)=0 |
virtual void | append (valuetype *values, uint64_t count) |
virtual void | append (listnode< valuetype > *node)=0 |
virtual void | insertBefore (listnode< valuetype > *node, valuetype value)=0 |
virtual void | insertBefore (listnode< valuetype > *node, valuetype *values, uint64_t count) |
virtual void | insertBefore (listnode< valuetype > *node, listnode< valuetype > *newnode)=0 |
virtual void | insertAfter (listnode< valuetype > *node, valuetype value)=0 |
virtual void | insertAfter (listnode< valuetype > *node, valuetype *values, uint64_t count) |
virtual void | insertAfter (listnode< valuetype > *node, listnode< valuetype > *newnode)=0 |
virtual void | moveBefore (listnode< valuetype > *node, listnode< valuetype > *nodetomove)=0 |
virtual void | moveAfter (listnode< valuetype > *node, listnode< valuetype > *nodetomove)=0 |
virtual void | detach (listnode< valuetype > *node)=0 |
virtual bool | remove (valuetype value)=0 |
virtual bool | removeAll (valuetype value)=0 |
virtual bool | remove (listnode< valuetype > *node)=0 |
virtual listnode< valuetype > * | getFirst ()=0 |
virtual listnode< valuetype > * | getNext (listnode< valuetype > *node)=0 |
virtual listnode< valuetype > * | find (valuetype value)=0 |
virtual listnode< valuetype > * | find (listnode< valuetype > *startnode, valuetype value)=0 |
virtual void | sortInexpensively ()=0 |
virtual void | sortQuickly ()=0 |
virtual ssize_t | write () |
virtual ssize_t | write (output *out) |
virtual ssize_t | writeJson () |
virtual ssize_t | writeJson (bool indent) |
virtual ssize_t | writeJson (output *out) |
virtual ssize_t | writeJson (output *out, bool indent) |
Public Member Functions inherited from collection | |
collection () | |
collection (collection &c) | |
collection & | operator= (collection &c) |
virtual | ~collection () |
virtual uint64_t | getCount ()=0 |
comparator * | getComparator () |
void | setComparator (comparator *newcomp) |
virtual bool | isReadOnly () |
virtual bool | isBlockBased () |
virtual uint64_t | getBlockSize () |
virtual bool | isSequentialAccess () |
virtual void | setManageValues (bool manage) |
virtual bool | getManageValues () |
virtual void | setManageArrayValues (bool manage) |
virtual bool | getManageArrayValues () |
virtual void | setManageKeys (bool manage) |
virtual bool | getManageKeys () |
virtual void | setManageArrayKeys (bool manage) |
virtual bool | getManageArrayKeys () |
virtual bool | clear ()=0 |
Public Member Functions inherited from object | |
virtual | ~object () |
The listcollection class is the parent class for all rudiments list collections.
|
inline |
Creates an empty instance of the listcollection class.
|
inline |
Creates an instance of the listcollection class that is a copy of "a".
|
pure virtual |
Appends already created listnode "node" to the listcollection.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
inlinevirtual |
Creates new listnodes containing "count" members of array "value" and appends them to the listcollection.
|
pure virtual |
Creates a new listnode containing "value" and appends it to the listcollection.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Detaches "node" from the list.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Returns a pointer to the first listnode after "startnode" containing "value" or NULL if "value" was not found.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Returns a pointer to the first listnode containing "value" or NULL if "value" was not found.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Returns the first node in the listcollection.
Implements nodecollection< valuetype >.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Returns the node after "node" or NULL if this node is the last node in the list. "node" is presumed to be in the list.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
inlinevirtual |
Returns "list".
Implements collection.
|
pure virtual |
Inserts already created listnode "newnode" into the listcollection after "node".
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
inlinevirtual |
Creates new listnodes containing "count" members of array "value" and inserts them into the listcollection after "node".
|
pure virtual |
Creates a new listnode containing "value" and inserts it into the listcollection after "node".
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Inserts already created listnode "newnode" into the listcollection before "node".
Implemented in linkedlist< valuetype >.
|
inlinevirtual |
Creates new listnodes containing "count" members of array "value" and inserts them into the listcollection before "node".
|
pure virtual |
Creates a new listnode containing "value" and inserts it into the listcollection before "node".
Implemented in linkedlist< valuetype >.
|
pure virtual |
Moves node "nodetomove" to the position after "node" in the listcollection.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Moves node "nodetomove" to the position before "node" in the listcollection.
Implemented in linkedlist< valuetype >.
|
pure virtual |
Prepends already created listnode "node" to the listcollection.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
inlinevirtual |
Creates new listnodes containing "count" members of array "value" and prepends them to the listcollection.
|
pure virtual |
Creates a new listnode containing "value" and prepends it to the listcollection.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Removes listnode "node" from the listcollection.
The value stored in the listnode is only deleted if setManageValues(true) or setManageArrayValues(true) has been called.
Note that this operation does not require a search and is far less expensive than the remove(value) operation and removeAll().
Returns true on success and false on failure.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Deletes the first listnode containing "value".
The value stored in the listnode is only deleted if setManageValues(true) or setManageArrayValues(true) has been called.
Note that this operation requires a search and is expensive in both execution time and code size.
Returns true on success and false on failure.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Deletes all listnodes containing "value".
The value stored in each listnode is only deleted if setManageValues(true) or setManageArrayValues(true) has been called.
Note that this operation requires a search and is expensive in both execution time and code size.
Returns true on success and false on failure.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Sorts the listcollection.
This sort is potentially much slower than sortQuickly() but uses no additional memory.
The order that the items are sorted into depends on the comparator that is being used, and how that comparator is configured. The default comparator, in its default configuration causes the list to be sorted in ascending order.
See collection::setComparator() and the comparator class for more detail.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
pure virtual |
Sorts the listcollection.
This sort is potentially much faster than sortInexpensively() but uses additional memory in proportion to the size of the list.
The order that the items are sorted into depends on the comparator that is being used, and how that comparator is configured. The default comparator, in its default configuration causes the list to be sorted in ascending order.
See collection::setComparator() and the comparator class for more detail.
Implemented in singlylinkedlist< valuetype >, and linkedlist< valuetype >.
|
inlinevirtual |
Writes a representation of the listcollection to standard output.
Implements collection.
|
inlinevirtual |
Writes a representation of the listcollection to "out".
Implements collection.
|
inlinevirtual |
Writes a JSON representation of the listcollection to standard output.
Implements collection.
|
inlinevirtual |
Writes a JSON representation of the listcollection to standard output.
If "indent" is true, then the output is automatically indented. If "indent" is false, then the tree is written without indentation.
Implements collection.
|
inlinevirtual |
Writes a JSON representation of the listcollection to "out".
Implements collection.
|
inlinevirtual |
Writes a JSON representation of the listcollection to "out".
If "indent" is true, then the output is automatically indented. If "indent" is false, then the tree is written without indentation.
Implements collection.