5 #include <libutl/SortedCollection.h> 6 #include <libutl/SkipListNode.h> 10 #ifdef UTL_SKIPLIST_RNG 11 #include <libutl/RandUtils.h> 69 init(owner, multiSet, ordering, maxLevel);
72 virtual void steal(
Object& rhs);
74 virtual size_t innerAllocatedSize()
const;
80 iterator findIt(
const Object& key)
const;
82 iterator findIt(
const Object& key);
94 findFirstIt(
const Object& key,
BidIt& it,
bool insert =
false)
const 100 virtual void findFirstIt(
const Object& key,
BidIt& it,
bool insert =
false);
108 iterator findFirstIt(
const Object& key,
bool insert =
false)
const;
116 iterator findFirstIt(
const Object& key,
bool insert =
false);
125 virtual void findLastIt(
const Object& key,
BidIt& it);
132 iterator findLastIt(
const Object& key)
const;
139 iterator findLastIt(
const Object& key);
147 return super::add(
object);
150 virtual bool add(
const Object*
object);
155 super::add(collection);
161 return super::insert(
object, it);
164 virtual void insert(
const Object*
object,
const BidIt& it);
169 virtual void clear();
178 virtual bool remove(
const Object& key);
180 virtual void removeIt(
BidIt& it);
185 inline iterator begin()
const;
187 inline iterator begin();
189 inline virtual BidIt* beginNew()
const;
191 inline virtual BidIt* beginNew();
193 inline iterator end()
const;
195 inline iterator end();
197 inline virtual BidIt* endNew()
const;
199 inline virtual BidIt* endNew();
202 static void utl_init();
204 static void utl_deInit();
207 void init(
bool owner =
true,
208 bool multiSet =
false,
212 iterator findIt(
const Object& key,
uint_t findType)
const;
223 #ifdef UTL_SKIPLIST_RNG 224 randutils::default_rng* _rng;
237 #include <libutl/TSkipList.h> #define const_cast_this
Pointer to the object the method was invoked on (casting away const).
void deInit()
De-initialize UTL++.
Object comparison abstraction.
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
Templated proxy for BidIt.
#define IFDEBUG(x)
Do x in DEBUG mode only.
unsigned int uint32_t
Unsigned 32-bit integer.
Abstraction for a Collection whose objects may be sorted.
void setConst(bool p_const)
Set the const flag.
unsigned int uint_t
Unsigned integer.
SkipList(bool owner, bool multiSet=false, Ordering *ordering=nullptr, uint_t maxLevel=19)
Constructor.
Bi-directional iterator abstraction.
find first matching object
Bi-directional SkipList iterator.
Root of UTL++ class hierarchy.
void init()
Initialize UTL++.
#define ASSERTD
Do an assertion in DEBUG mode only.