Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NavKeyFunc Class Reference

#include <NavKeyFunc.h>

List of all members.

Public Member Functions

virtual ~NavKeyFunc ()
Bool_t IsCompatible (const NavSet *set) const
NavKeyGetKey (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

NavSetfSet
std::map< void *, NavKeyfCachedKeys


Constructor & Destructor Documentation

virtual NavKeyFunc::~NavKeyFunc  )  [inline, virtual]
 

Definition at line 30 of file NavKeyFunc.h.

00030 { LEA_DTOR; }

NavKeyFunc::NavKeyFunc NavSet set  )  [inline, protected]
 

Definition at line 42 of file NavKeyFunc.h.

00042 : fSet(set) { LEA_CTOR; }  

NavKeyFunc::NavKeyFunc const NavKeyFunc  )  [private]
 


Member Function Documentation

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, 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 }

Bool_t NavKeyFunc::IsCompatible const NavSet set  )  const [inline]
 

Definition at line 33 of file NavKeyFunc.h.

Referenced by NavSet::KeyFunAcceptable().

00033                                                      { 
00034                             return ( fSet == set ) ? kTRUE : kFALSE; }

virtual NavKey NavKeyFunc::operator() const void *  obj  )  const [pure virtual]
 

Referenced by GetKey().


Member Data Documentation

std::map<void *,NavKey> NavKeyFunc::fCachedKeys [mutable, private]
 

Definition at line 53 of file NavKeyFunc.h.

Referenced by GetKey().

NavSet* NavKeyFunc::fSet [private]
 

Definition at line 51 of file NavKeyFunc.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:38 2010 for loon by  doxygen 1.3.9.1