#include <NavKeyFunc.h>
Public Member Functions | |
| virtual | ~NavKeyFunc () |
| Bool_t | IsCompatible (const NavSet *set) const |
| NavKey & | GetKey (void *obj) const |
| virtual NavKey | operator() (const void *obj) const =0 |
| virtual Bool_t | FunDefined () const =0 |
Protected Member Functions | |
| NavKeyFunc (NavSet *set) | |
Private Member Functions | |
| NavKeyFunc (const NavKeyFunc &) | |
Private Attributes | |
| NavSet * | fSet |
| std::map< void *, NavKey > | fCachedKeys |
Definition at line 23 of file NavKeyFunc.h.
| virtual NavKeyFunc::~NavKeyFunc | ( | ) | [inline, virtual] |
| NavKeyFunc::NavKeyFunc | ( | NavSet * | set | ) | [inline, protected] |
| NavKeyFunc::NavKeyFunc | ( | const NavKeyFunc & | ) | [private] |
| virtual Bool_t NavKeyFunc::FunDefined | ( | ) | const [pure virtual] |
Referenced by NavSet::KeyFunAcceptable().
| NavKey & NavKeyFunc::GetKey | ( | void * | obj | ) | const |
Definition at line 42 of file NavKeyFunc.cxx.
References fCachedKeys.
00042 { 00043 // 00044 // 00045 // Purpose: Return key associated with set member obj 00046 // 00047 00048 // Try the cache first. 00049 std::map<void *,NavKey>::iterator keyItr = fCachedKeys.find(obj); 00050 if ( keyItr != fCachedKeys.end() ) return keyItr->second; 00051 00052 // Not in cache, compute it and store. 00053 NavKey key = this->operator()(obj); 00054 fCachedKeys[obj] = key; 00055 return fCachedKeys[obj]; 00056 }
| Bool_t NavKeyFunc::IsCompatible | ( | const NavSet * | set | ) | const [inline] |
Definition at line 33 of file NavKeyFunc.h.
References fSet.
Referenced by NavSet::KeyFunAcceptable().
00033 { 00034 return ( fSet == set ) ? kTRUE : kFALSE; }
| virtual NavKey NavKeyFunc::operator() | ( | const void * | obj | ) | const [pure virtual] |
std::map<void *,NavKey> NavKeyFunc::fCachedKeys [mutable, private] |
NavSet* NavKeyFunc::fSet [private] |
1.4.7