15 #define INVALID_INDEX -1 17 #define MAKE_SETTYPE_DEF(E, T) \ 18 typedef DynaHashSet<E> T##Set 70 constexpr
static int INITIAL_SIZE = 3;
71 constexpr
static double LOAD_FACTOR = 0.75;
84 int _getHashCode(
const V*
value)
const;
85 void _reHash(
int newCapacity);
86 int _getTableIndex(V*
value);
102 int count()
const {
return _count; }
106 bool contains(V* obj) {
return getEntry(obj) !=
nullptr; }
109 _ownsMembers = ownsMembers;
121 void deleteEntry(V* value);
122 void deleteEntry(V value);
135 int _expectedModCount;
140 : _curIndex(start), _expectedModCount(0), _set(set) {}
147 return _curIndex == other._curIndex;
151 return _curIndex != other._curIndex;
155 return _set->
_table[_curIndex];
169 template <
typename V>
class SetIter {
182 return _curIndex == other._curIndex;
186 return _curIndex != other._curIndex;
189 V* operator* ()
const {
207 #endif //DYNAHASHSET_H GeneratorWrapper< T > values(std::initializer_list< T > values)
Definition: catch.hpp:4009
static V * nullObject
Definition: DynaHashSet.h:90
int _modCount
Definition: DynaHashSet.h:80
bool hasNext()
Definition: DynaHashSet.h:143
bool hasNext()
Definition: DynaHashSet.h:178
bool isEmpty() const
Definition: DynaHashSet.h:105
int _count
Definition: DynaHashSet.h:77
V * getValue() const
Definition: DynaHashSet.h:36
SetEntry< V > * copy() override
Definition: DynaHashSetImpl.h:102
static V nullObjectInstance
Definition: DynaHashSet.h:89
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:4005
Definition: DynaHashSet.h:25
bool contains(V *obj)
Definition: DynaHashSet.h:106
int getIndex()
Definition: DynaHashSet.h:142
bool operator==(const SetEntry< V > &other) const override
Definition: DynaHashSetImpl.h:197
bool hasPrev()
Definition: DynaHashSet.h:144
SetEntry(V *value, bool ownsValue)
Definition: DynaHashSetImpl.h:74
SetIter(const DynaHashSet< V > *set)
Definition: DynaHashSet.h:175
int capacity() const
Definition: DynaHashSet.h:103
bool isOwnsValue() const
Definition: DynaHashSet.h:40
int count() const
Definition: DynaHashSet.h:102
void setOwnsMembers(bool ownsMembers)
Definition: DynaHashSet.h:108
int _capacity
Definition: DynaHashSet.h:78
bool _ownsMembers
Definition: DynaHashSet.h:81
DynaSetIter(const DynaHashSet< V > *set, int start)
Definition: DynaHashSet.h:139
#define INVALID_INDEX
Definition: DynaHashSet.h:15
bool isOwnsMembers() const
Definition: DynaHashSet.h:107
int getIndex()
Definition: DynaHashSet.h:177
Definition: DynaHashSet.h:63
CONSTCD11 bool operator!=(const day &x, const day &y) NOEXCEPT
Definition: date.h:1282
Definition: DynaHashSet.h:61
int add(int code, T value)
Definition: HashCoder.h:34
bool hasPrev()
Definition: DynaHashSet.h:179
Definition: DynaHashSet.h:60
Definition: IComparable.h:8
int _freeCells
Definition: DynaHashSet.h:79
SetIter< V > end()
Definition: DynaHashSet.h:201
static SetEntry< V > * deletedObject
Definition: DynaHashSet.h:74
SetIter< V > begin()
Definition: DynaHashSet.h:197
static SetEntry< V > deletedObjectInstance
Definition: DynaHashSet.h:73
Definition: ICopyable.h:8
SetEntry< V > ** _table
Definition: DynaHashSet.h:76
int freeCells() const
Definition: DynaHashSet.h:104
const V * setValue(V *newValue)
Definition: DynaHashSetImpl.h:192