sipxportlib
Version 3.3
|
#include <UtlLink.h>
Public Member Functions | |
UtlChain () | |
Constructor initializes to unlinked. More... | |
~UtlChain () | |
Destructor. More... | |
Protected Member Functions | |
Chain Operations | |
These methods manipulate the forward and backward links within a chain. They do no do anything with respect to any header, so they can be used to implement chains that are linear (NULL terminated) or circular. | |
bool | isUnLinked () const |
Is this block not linked to anything? More... | |
void | unchain () |
Take the link out of its chain. More... | |
void | chainBefore (UtlChain *existing) |
Insert a new UtlChain before existing. More... | |
void | chainAfter (UtlChain *existing) |
Insert a new UtlChain after existing.. More... | |
List Operations | |
These methods do the special handling for using a UtlChain as a list header. The UtlChain.next points to the head (first) UtlLink on the list. The UtlChain.prev points to the tail (last) UtlLink. The UtlLink objects on the list form a NULL-terminated chain - they do not point to the UtlChain that serves as the header. | |
UtlChain * | listHead () const |
Returns the head (first) UtlLink on the list (or NULL if the list is empty). More... | |
UtlChain * | listTail () const |
Returns the tail (last) UtlLink on the list (or NULL if the list is empty). More... | |
UtlLink * | head () const |
Returns the head (first) UtlLink on the list (or NULL if the list is empty). More... | |
UtlLink * | tail () const |
Returns the tail (last) UtlLink on the list (or NULL if the list is empty). More... | |
void | listBefore (UtlChain *list, UtlChain *existing) |
Insert this link into a list before an existing entry (before NULL == at the tail). More... | |
void | listAfter (UtlChain *list, UtlChain *existing) |
Insert this link into a list after an existing entry (after NULL == at the head). More... | |
UtlChain * | detachFromList (UtlChain *listHead) |
Remove a link from a list. More... | |
Protected Attributes | |
UtlChain * | prev |
backward chain pointer More... | |
UtlChain * | next |
forward chain pointer More... | |
Friends | |
class | UtlChainPool |
class | UtlLink |
class | UtlPair |
class | UtlContainer |
class | UtlList |
class | UtlHashMap |
class | UtlHashMapIterator |
class | UtlHashBag |
class | UtlHashBagIterator |
class | UtlChainTest |
class | UtlLinkTest |
UtlChain is the internal class that implements the linked list blocks for other Utl classes. It may not be used directly because by itself it is not thread safe. Use one of the lists types derived from UtlList.
Each UltLinkChain links forward (next) and backward (prev) in the chain of links; ends of a chain are indicated by NULL values. A UtlChain not in a chain, including a newly constructed instance, have NULL pointers in both directions.
A UtlChain can also be used as a list header whose links point to the ends of a NULL terminated list.
|
inline |
Constructor initializes to unlinked.
|
inline |
Destructor.
|
inlineprotected |
Is this block not linked to anything?
|
inlineprotected |
Take the link out of its chain.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Returns the head (first) UtlLink on the list (or NULL if the list is empty).
|
inlineprotected |
Returns the tail (last) UtlLink on the list (or NULL if the list is empty).
|
inlineprotected |
Returns the head (first) UtlLink on the list (or NULL if the list is empty).
|
inlineprotected |
Returns the tail (last) UtlLink on the list (or NULL if the list is empty).
Insert this link into a list before an existing entry (before NULL == at the tail).
Insert a new item into a list before an existing entry (before NULL == at the tail).
list | the list to insert into |
existing | the UtlLink for the position in the list to insert before. NULL means at the end of the list. |
Insert this link into a list after an existing entry (after NULL == at the head).
Insert a new item into a list before an existing entry (after NULL == at the head).
list | the list to insert into |
existing | the UtlLink for the position in the list to insert after. NULL means at the beginning of the list. |
Remove a link from a list.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
backward chain pointer
|
protected |
forward chain pointer