23 #ifndef UTLLINK_BLOCK_SIZE 24 #define UTLLINK_BLOCK_SIZE 1000 95 return (!(prev||next));
124 prev = existing->
prev;
130 existing->
prev =
this;
143 next = existing->
next;
148 existing->
next =
this;
269 for (theLink=const_cast<UtlLink*>(
this);
270 theLink && theLink->
data != target;
271 theLink=theLink->
next())
281 for (theLink=const_cast<UtlLink*>(
this);
282 theLink && theLink->
hash != targetHash;
283 theLink=theLink->
next())
306 static size_t totalAllocated();
446 static void allocate(
size_t blocksize,
486 static void allocate(
size_t blocksize,
493 #endif // _UTLLINK_H_ static UtlChainPool * spPairPool
Definition: UtlLink.h:476
Definition: UtlSListIterator.h:37
UtlChain * prev
backward chain pointer
Definition: UtlLink.h:79
UtlLink * findNextHash(unsigned targetHash) const
Linear search starting at this link for a matching data value.
Definition: UtlLink.h:278
UtlChain * detachFromList(UtlChain *listHead)
Remove a link from a list.
Definition: UtlLink.cpp:105
UtlContainable * data
The containable object whose place in the list this UtlLink is tracking.
Definition: UtlLink.h:290
UtlLink * findDataRef(UtlContainable *target) const
Linear search starting at this link for a matching data value.
Definition: UtlLink.h:266
Definition: UtlSortedList.h:44
void chainBefore(UtlChain *existing)
Insert a new UtlChain before existing.
Definition: UtlLink.h:117
UtlChain * listTail() const
Returns the tail (last) UtlLink on the list (or NULL if the list is empty).
Definition: UtlLink.h:172
UtlChain * next
forward chain pointer
Definition: UtlLink.h:80
UtlLink * tail() const
Returns the tail (last) UtlLink on the list (or NULL if the list is empty).
Definition: UtlLink.h:184
~UtlPair()
Definition: UtlLink.h:472
bool isUnLinked() const
Is this block not linked to anything?
Definition: UtlLink.h:93
Pool of available objects derived from UtlChain.
Definition: UtlChainPool.h:37
UtlLink * head() const
Returns the head (first) UtlLink on the list (or NULL if the list is empty).
Definition: UtlLink.h:178
friend class UtlChainTest
Definition: UtlLink.h:76
#define NULL
Definition: UtlDefs.h:29
Definition: UtlHashMapIterator.h:38
UtlLink * prev() const
Returns the next UtlLink backward in a chain (or NULL for the end).
Definition: UtlLink.h:260
UtlChain * listHead() const
Returns the head (first) UtlLink on the list (or NULL if the list is empty).
Definition: UtlLink.h:166
Definition: UtlListIterator.h:37
Definition: UtlContainable.h:37
void unchain()
Take the link out of its chain.
Definition: UtlLink.h:99
~UtlChain()
Destructor.
Definition: UtlLink.h:61
Definition: UtlLink.h:241
UtlContainable * value
Definition: UtlLink.h:465
UtlChain()
Constructor initializes to unlinked.
Definition: UtlLink.h:54
friend class UtlLinkTest
Definition: UtlLink.h:77
UtlPair()
Definition: UtlLink.h:467
Definition: UtlSList.h:47
UtlLink * next() const
Returns the next UtlLink forward in a chain (or NULL for the end).
Definition: UtlLink.h:254
Definition: UtlHashBag.h:41
Utl initializer class. Solves the problem with ordering of constructors & destructors.
Definition: UtlInit.h:40
Definition: UtlHashMap.h:46
Associate a key object (the parent UtlLink data) with its value object.
Definition: UtlLink.h:457
#define assert(exp)
Definition: WinCEFixups.h:37
~UtlLink()
Destructor.
Definition: UtlLink.h:429
Definition: UtlHashBagIterator.h:38
unsigned hash
The hash code for the containable object whose place in the list this UtlLink is tracking.
Definition: UtlLink.h:292
Definition: UtlContainer.h:38
void chainAfter(UtlChain *existing)
Insert a new UtlChain after existing..
Definition: UtlLink.h:138
UtlLink()
The UtlLink constructor is protected.
Definition: UtlLink.h:419
void listBefore(UtlChain *list, UtlChain *existing)
Insert this link into a list before an existing entry (before NULL == at the tail).
Definition: UtlLink.cpp:44
void listAfter(UtlChain *list, UtlChain *existing)
Insert this link into a list after an existing entry (after NULL == at the head). ...
Definition: UtlLink.cpp:75