MCPcopy Create free account
hub / github.com/catboost/catboost / TIterator

Class TIterator

library/cpp/cache/cache.h:477–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475
476public:
477 class TIterator {
478 public:
479 explicit TIterator(const TIndexConstIterator& iter)
480 : Iter(iter)
481 {
482 }
483
484 TValue& operator*() {
485 return const_cast<TValue&>(Iter->Value);
486 }
487
488 TValue* operator->() {
489 return const_cast<TValue*>(&Iter->Value);
490 }
491
492 bool operator==(const TIterator& rhs) const {
493 return Iter == rhs.Iter;
494 }
495
496 bool operator!=(const TIterator& rhs) const {
497 return Iter != rhs.Iter;
498 }
499
500 TIterator& operator++() {
501 ++Iter;
502 return *this;
503 }
504
505 const TKey& Key() const {
506 return Iter->Key;
507 }
508
509 const TValue& Value() const {
510 return Iter->Value;
511 }
512
513 friend class TCache<TKey, TValue, TListType, TDeleter, TAllocator>;
514
515 private:
516 TIndexConstIterator Iter;
517 };
518
519 TCache(TListType&& list, bool multiValue = false)
520 : Index()

Callers 9

BeginMethod · 0.70
EndMethod · 0.70
FindMethod · 0.70
FindWithoutPromoteMethod · 0.70
FindByItemMethod · 0.70
IteratorMethod · 0.50
Y_UNIT_TESTFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected