Base abstract class for defining a hierarchical data structure in GCGlib for ordered nodes. It indicates the minimum methods that all data structures with ordered elements must provide. Note that some data structures might provide other interfaces to handle their elements. This interface is different than gcgLISTSTRUCTURE where the elements can be positioned anywhere in the data structure. Some data maps will also need a compare() method which is responsible for comparing any two ordered nodes.
More...
|
virtual gcgORDEREDNODE * | insert (gcgORDEREDNODE *newnode)=0 |
| Inserts a new entry newnode in the data structure. In general ordered structures require unique keys. However, this requirement can be relaxed by combining ordered data structures with other data structures. In most cases, the data structure only works for unique nodes and they must be mutually different in respect to gcgORDEREDSTRUCTURE::compare() method. Note that this restriction can also be easily broken by adapting the gcgORDEREDSTRUCTURE::compare() method. More...
|
|
virtual gcgORDEREDNODE * | search (gcgORDEREDNODE *key)=0 |
| Retrieves the entry of the data structure that is similar to the key in respect to the gcgORDEREDSTRUCTURE::compare() method. One or multiple attributes of key can be used for data retrieval. The gcgORDEREDSTRUCTURE::compare() method returns zero only for similar nodes of the data structure. If multiple nodes in the data structure are similar to key, then the gcgORDEREDSTRUCTURE::search() will return the first node found. Some data structures require the nodes to be unique. More...
|
|
virtual gcgORDEREDNODE * | remove (gcgORDEREDNODE *key)=0 |
| Removes the entry of the data structure that is similar to the key in respect to the gcgORDEREDSTRUCTURE::compare() method. One or multiple attributes of key can be used for data retrieval and subsequent removal. The gcgORDEREDSTRUCTURE::compare() method returns zero only for similar nodes node in the data structure. If multiple nodes are similar to key, then the first found is removed. Some data structures require the nodes to be unique. More...
|
|
virtual int | compare (gcgORDEREDNODE *refnode1, gcgORDEREDNODE *refnode2)=0 |
| Method that must be furnished by a specialization of gcgORDEREDSTRUCTURE and is responsible for comparing two gcgORDEREDNODE nodes. This is generally necessary for all tree operations of insertion, retrieval and removal. It must compare the two nodes pointed by refnode1 and refnode2 and return zero if they are equal, -1 if refnode1 is smaller or precedes refnode2, or 1 if refnode1 is grater or succeeds refnode2. This virtual method is in the data structure, instead in the ordered node, because this will save a vtable pointer per node in C++. More...
|
|
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 hierarchical data structure in GCGlib for ordered nodes. It indicates the minimum methods that all data structures with ordered elements must provide. Note that some data structures might provide other interfaces to handle their elements. This interface is different than gcgLISTSTRUCTURE where the elements can be positioned anywhere in the data structure. Some data maps will also need a compare() method which is responsible for comparing any two ordered nodes.
- Since
- 0.04.179