Home | History | Annotate | Download | only in src

Lines Matching defs:ElementType

48 // - The templated class `ElementType` must provide comparison operators so that
69 // 'ElementType' and 'KeyType' are respectively the types of the elements and
75 class ElementType, \
84 ElementType, N_PREALLOCATED_ELEMENTS, KeyType, INVALID_KEY, RECLAIM_FROM, \
105 void insert(const ElementType& element);
109 size_t erase(const ElementType& element);
121 const ElementType GetMinElement();
126 static bool IsValid(const ElementType& element);
127 static KeyType GetKey(const ElementType& element);
128 static void SetKey(ElementType* element, KeyType key);
130 typedef ElementType _ElementType;
136 ElementType* Search(const ElementType& element);
141 void EraseInternal(ElementType* element);
144 ElementType* BinarySearch(const ElementType& element,
145 ElementType* start,
146 ElementType* end) const;
163 const ElementType Front() const;
164 const ElementType Back() const;
168 const ElementType CleanBack();
171 const ElementType* StorageBegin() const;
172 const ElementType* StorageEnd() const;
173 ElementType* StorageBegin();
174 ElementType* StorageEnd();
178 size_t GetElementIndex(const ElementType* element) const;
181 const ElementType* GetElementAt(size_t index) const;
182 ElementType* GetElementAt(size_t index);
184 static const ElementType* GetFirstValidElement(const ElementType* from,
185 const ElementType* end);
188 const ElementType GetCachedMinElement() const;
215 ElementType preallocated_[kNPreallocatedElements];
216 std::vector<ElementType>* vector_;
251 typedef typename S::_ElementType ElementType;
282 static bool IsValid(const ElementType& element);
283 static KeyType GetKey(const ElementType& element);
292 ElementType& operator*() { return *Current(); }
293 const ElementType& operator*() const { return *Current(); }
294 ElementType* operator->() { return Current(); }
295 const ElementType* operator->() const { return Current(); }
306 typename std::vector<ElementType>::iterator iterator_;
311 ElementType* Current() const;
349 void InvalSet<TEMPLATE_INVALSET_P_DEF>::insert(const ElementType& element) {
362 new std::vector<ElementType>(preallocated_, preallocated_ + size_);
381 size_t InvalSet<TEMPLATE_INVALSET_P_DEF>::erase(const ElementType& element) {
384 ElementType* local_element = Search(element);
394 ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::Search(
395 const ElementType& element) {
438 const ElementType InvalSet<TEMPLATE_INVALSET_P_DEF>::GetMinElement() {
458 bool InvalSet<TEMPLATE_INVALSET_P_DEF>::IsValid(const ElementType& element) {
464 void InvalSet<TEMPLATE_INVALSET_P_DEF>::EraseInternal(ElementType* element) {
476 ElementType* end = preallocated_ + kNPreallocatedElements;
484 ElementType* min = GetFirstValidElement(element, StorageEnd());
496 ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::BinarySearch(
497 const ElementType& element, ElementType* start, ElementType* end) const {
507 ElementType* elements = start;
567 ElementType* start = &(vector_->front());
568 ElementType* end = start + vector_->size();
569 ElementType* c = start;
570 ElementType* first_invalid;
571 ElementType* first_valid;
572 ElementType* next_invalid;
604 const ElementType InvalSet<TEMPLATE_INVALSET_P_DEF>::Front() const {
611 const ElementType InvalSet<TEMPLATE_INVALSET_P_DEF>::Back() const {
618 const ElementType InvalSet<TEMPLATE_INVALSET_P_DEF>::CleanBack() {
622 typename std::vector<ElementType>::reverse_iterator it = vector_->rbegin();
633 const ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::StorageBegin() const {
639 const ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::StorageEnd() const {
645 ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::StorageBegin() {
651 ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::StorageEnd() {
658 const ElementType* element) const {
665 const ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::GetElementAt(
673 ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::GetElementAt(size_t index) {
680 const ElementType* InvalSet<TEMPLATE_INVALSET_P_DEF>::GetFirstValidElement(
681 const ElementType* from, const ElementType* end) {
699 const ElementType* min = GetFirstValidElement(StorageBegin(), StorageEnd());
739 iterator_ = typename std::vector<ElementType>::iterator(
806 bool InvalSetIterator<S>::IsValid(const ElementType& element) {
812 typename S::_KeyType InvalSetIterator<S>::GetKey(const ElementType& element) {
874 typename std::vector<ElementType>::iterator default_iterator;