ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
![]() ![]() |
A linked object base class for ordered objects. More...
#include <linked.h>
Public Member Functions | |
void | enlistTail (OrderedIndex *index) |
List our ordered object at end of a linked list on an index. More... | |
void | enlistHead (OrderedIndex *index) |
List our ordered object at start of a linked list on an index. More... | |
virtual void | enlist (OrderedIndex *index) |
List our ordered object in default strategy mode. More... | |
void | delist (OrderedIndex *index) |
Remove our ordered object from an existing index. More... | |
OrderedObject * | getNext (void) const |
Get next ordered member when iterating. More... | |
![]() | |
virtual | ~LinkedObject () |
virtual void | release (void) __OVERRIDE |
Release list, mark as no longer linked. More... | |
virtual void | retain (void) __OVERRIDE |
Retain by marking as self referenced list. More... | |
void | enlist (LinkedObject **root) |
Add our object to an existing linked list through a pointer. More... | |
void | delist (LinkedObject **root) |
Locate and remove ourselves from a list of objects. More... | |
bool | is_member (LinkedObject *list) const |
Search to see if we are a member of a specific list. More... | |
LinkedObject * | getNext (void) const |
Get next effective object when iterating. More... | |
Protected Member Functions | |
OrderedObject (OrderedIndex *index) | |
Construct an ordered object aot end of a an index. More... | |
OrderedObject () | |
Construct an ordered object unattached. More... | |
OrderedObject (const OrderedObject &from) | |
![]() | |
LinkedObject (LinkedObject **root) | |
Construct base class attached to a chain of objects. More... | |
LinkedObject () | |
Construct base class unattached to anyone. More... | |
LinkedObject (const LinkedObject &from) | |
Friends | |
class | DLinkedObject |
class | OrderedIndex |
Additional Inherited Members | |
![]() | |
static void | purge (LinkedObject *root) |
Release all objects from a list. More... | |
static unsigned | count (const LinkedObject *root) |
Count the number of linked objects in a list. More... | |
static LinkedObject * | getIndexed (LinkedObject *root, unsigned index) |
Get member by index. More... | |
![]() | |
LinkedObject * | Next |
A linked object base class for ordered objects.
This is used for objects that must be ordered and listed through the OrderedIndex class.
|
protected |
Construct an ordered object aot end of a an index.
index | we are listed on. |
Definition at line 643 of file linked.cpp.
References enlistTail(), and ucommon::LinkedObject::Next.
|
protected |
Construct an ordered object unattached.
Definition at line 635 of file linked.cpp.
|
protected |
Definition at line 639 of file linked.cpp.
void ucommon::OrderedObject::delist | ( | OrderedIndex * | index | ) |
Remove our ordered object from an existing index.
index | we are listed on. |
Definition at line 651 of file linked.cpp.
References getNext(), ucommon::OrderedIndex::head, ucommon::LinkedObject::Next, and ucommon::OrderedIndex::tail.
Referenced by ucommon::keyfile::create(), ucommon::NamedTree::purge(), ucommon::NamedTree::relistHead(), ucommon::NamedTree::relistTail(), and ucommon::NamedTree::remove().
|
virtual |
List our ordered object in default strategy mode.
The default base class uses enlistTail.
index | we are listing on. |
Reimplemented in ucommon::DLinkedObject.
Definition at line 676 of file linked.cpp.
References enlistTail(), and ucommon::LinkedObject::Next.
Referenced by ucommon::shell::getargv(), and ucommon::shell::parse().
void ucommon::OrderedObject::enlistHead | ( | OrderedIndex * | index | ) |
List our ordered object at start of a linked list on an index.
index | we are listing on. |
Definition at line 696 of file linked.cpp.
References ucommon::OrderedIndex::head, ucommon::LinkedObject::Next, and ucommon::OrderedIndex::tail.
Referenced by ucommon::NamedTree::relistHead().
void ucommon::OrderedObject::enlistTail | ( | OrderedIndex * | index | ) |
List our ordered object at end of a linked list on an index.
index | we are listing on. |
Definition at line 684 of file linked.cpp.
References ucommon::OrderedIndex::head, ucommon::LinkedObject::Next, and ucommon::OrderedIndex::tail.
Referenced by enlist(), ucommon::NamedTree::NamedTree(), OrderedObject(), and ucommon::NamedTree::relistTail().
|
inline |
|
friend |
|
friend |