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


Detailed Description

Definition at line 23 of file NavKeyFunc.h.


Constructor & Destructor Documentation

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

Definition at line 30 of file NavKeyFunc.h.

References LEA_DTOR.

00030 { LEA_DTOR; }

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

Definition at line 42 of file NavKeyFunc.h.

References LEA_CTOR.

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.

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]


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.

Referenced by IsCompatible().


The documentation for this class was generated from the following files:
Generated on Mon Sep 1 00:51:59 2014 for loon by  doxygen 1.4.7