MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / KeyInfo

Class KeyInfo

libCacheSim/dataStructure/sparsepp/spp.h:3487–3505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3485 // ExtractKey and SetKey.
3486 // ---------------------------------------------------------
3487 class KeyInfo : public ExtractKey, public SetKey, public EqualKey
3488 {
3489 public:
3490 KeyInfo(const ExtractKey& ek, const SetKey& sk, const EqualKey& eq)
3491 : ExtractKey(ek), SetKey(sk), EqualKey(eq)
3492 {
3493 }
3494
3495 // We want to return the exact same type as ExtractKey: Key or const Key&
3496 typename ExtractKey::result_type get_key(const_reference v) const
3497 {
3498 return ExtractKey::operator()(v);
3499 }
3500
3501 bool equals(const key_type& a, const key_type& b) const
3502 {
3503 return EqualKey::operator()(a, b);
3504 }
3505 };
3506
3507 // Utility functions to access the templated operators
3508 size_t hash(const key_type& v) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected