#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 30 of file NavKeyFunc.h. 00030 { LEA_DTOR; }
|
|
|
Definition at line 42 of file NavKeyFunc.h. 00042 : fSet(set) { LEA_CTOR; }
|
|
|
|
|
|
Referenced by NavSet::KeyFunAcceptable(). |
|
|
Definition at line 42 of file NavKeyFunc.cxx. References fCachedKeys, and operator()(). Referenced by NavSet::XLessThanY(). 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 }
|
|
|
Definition at line 33 of file NavKeyFunc.h. Referenced by NavSet::KeyFunAcceptable(). 00033 {
00034 return ( fSet == set ) ? kTRUE : kFALSE; }
|
|
|
Referenced by GetKey(). |
|
|
Definition at line 53 of file NavKeyFunc.h. Referenced by GetKey(). |
|
|
Definition at line 51 of file NavKeyFunc.h. |
1.3.9.1