GCGlib
0.04.228
GCG Graphics Engine
|
Base abstract class for defining a sequential data structure in GCGlib for lists. It indicates the minimum methods that all list structures with elements that can be in any position must provide. Note that some data structures might provide other interfaces to handle their elements. This interface is different than gcgORDEREDSTRUCTURE where the elements are ordered and countable in the data structure. More...
#include <gcg.h>
Public Member Functions | |
virtual bool | insertFirst (gcgLINK *newnode)=0 |
Inserts a new entry newnode in the first position of the data structure. More... | |
virtual bool | insertLast (gcgLINK *newnode)=0 |
Inserts a new entry newnode in the last position of the data structure. More... | |
virtual bool | insertAfter (gcgLINK *newnode, gcgLINK *node)=0 |
Inserts a new entry newnode in the data structure, after an existent entry pointed by node. More... | |
virtual bool | insertBefore (gcgLINK *newnode, gcgLINK *node)=0 |
Inserts a new entry newnode in the data structure, before an existent entry pointed by node. More... | |
virtual bool | moveToFirst (gcgLINK *node)=0 |
Move an entry node that is already in the data structure to its first position. The node will have a NULL previous link. More... | |
virtual bool | moveToLast (gcgLINK *node)=0 |
Move an entry node that is already in the data structure to its last position. The node will have a NULL next link. More... | |
virtual bool | switchNodes (gcgLINK *node1, gcgLINK *node2)=0 |
Switches the position of two existent elements of the data structure. The two nodes must be part of the data structure. More... | |
virtual bool | remove (gcgLINK *node)=0 |
Removes the entry from the data structure. The node must be part of the data structure. More... | |
Public Member Functions inherited from gcgCLASS | |
void * | operator new (size_t size) |
Defines a new operator to be used by instatiations of GCGlib classes instead the global one. More... | |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by instantiations of GCGlib classes instead the global one. Returns a NULL pointer instead of throwing an exception if an error occurs. More... | |
void * | operator new[] (size_t size) |
Defines a new operator to be used by GCGlib array allocations instead the global one. More... | |
void * | operator new[] (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by vector allocations instead the global one. More... | |
void | operator delete (void *p) |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete[] (void *p) |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
void | operator delete[] (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
Base abstract class for defining a sequential data structure in GCGlib for lists. It indicates the minimum methods that all list structures with elements that can be in any position must provide. Note that some data structures might provide other interfaces to handle their elements. This interface is different than gcgORDEREDSTRUCTURE where the elements are ordered and countable in the data structure.
Inserts a new entry newnode in the data structure, after an existent entry pointed by node.
[in] | newnode | a pointer to a linkable instance (gcgLINK) to be inserted after node. This pointer is deleted by the destructor or a deleteAll() call. A NULL value generates an error. |
[in] | node | a pointer to an entry that is already in the data structure. A NULL value has the same effect as insertFirst(newnode). After the insertion, the newnode will succeed the node in the data structure: node->next = newnode and newnode->previous = node. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
Inserts a new entry newnode in the data structure, before an existent entry pointed by node.
[in] | newnode | a pointer to a linkable instance (gcgLINK) to be inserted after node. This pointer is deleted by the destructor or a deleteAll() call. A NULL value generates an error. |
[in] | node | a pointer to an entry that is already in the data structure. A NULL value has the same effect as insertLast(newnode). After the insertion, the node will succeed the newnode in the data structure: newnode->next = node and node->previous = newnode. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
|
pure virtual |
Inserts a new entry newnode in the first position of the data structure.
[in] | newnode | a pointer to a linkable node (gcgLINK) to be inserted in the data structure. It is generally an object of a specialization of gcgLINK that carries the node information. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
|
pure virtual |
Inserts a new entry newnode in the last position of the data structure.
[in] | newnode | a pointer to a linkable node (gcgLINK) to be inserted in the data structure. It is generally an object of a specialization of gcgLINK that carries the node information. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
|
pure virtual |
Move an entry node that is already in the data structure to its first position. The node will have a NULL previous link.
[in] | node | a pointer to a linkable instance (gcgLINK) that is already in the data structure. A NULL value generates an error. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
|
pure virtual |
Move an entry node that is already in the data structure to its last position. The node will have a NULL next link.
[in] | node | a pointer to a linkable instance (gcgLINK) that is already in the data structure. A NULL value generates an error. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
|
pure virtual |
Removes the entry from the data structure. The node must be part of the data structure.
[in] | node | a pointer to a linkable node (gcgLINK) that carries the information to be removed from the data structure. It is generally an object of a specialization of gcgLINK that carries the information to be removed. The removed node is NOT deleted. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.
Switches the position of two existent elements of the data structure. The two nodes must be part of the data structure.
[in] | node1 | a pointer to a linkable node (gcgLINK) that carries the information to be switched with the position of node2. If NULL, an error occurs. |
[in] | node2 | a pointer to a linkable node (gcgLINK) that carries the information to be switched with the position of node1. If NULL, an error occurs. |
Implemented in gcgDOUBLELINKEDLIST, and gcgLINKEDLIST.