| 42 | }; |
| 43 | |
| 44 | struct EntryRef |
| 45 | { |
| 46 | public: |
| 47 | MultiHashSet* mSet; |
| 48 | int mIndex; |
| 49 | |
| 50 | public: |
| 51 | EntryRef() |
| 52 | { |
| 53 | mSet = NULL; |
| 54 | mIndex = -1; |
| 55 | } |
| 56 | |
| 57 | EntryRef(MultiHashSet* set, int index) |
| 58 | { |
| 59 | mSet = set; |
| 60 | mIndex = index; |
| 61 | } |
| 62 | |
| 63 | Entry* operator*() |
| 64 | { |
| 65 | return &this->mSet->mEntries[this->mIndex]; |
| 66 | } |
| 67 | |
| 68 | Entry* operator->() |
| 69 | { |
| 70 | return &this->mSet->mEntries[this->mIndex]; |
| 71 | } |
| 72 | |
| 73 | operator bool() const |
| 74 | { |
| 75 | return this->mIndex != -1; |
| 76 | } |
| 77 | }; |
| 78 | |
| 79 | struct Iterator |
| 80 | { |