| 475 | |
| 476 | public: |
| 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() |
no outgoing calls
no test coverage detected