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

GetCandidate.h

Go to the documentation of this file.
00001 #ifndef GETCANDIDATE_H
00002 #define GETCANDIDATE_H
00003 
00004 #include "CandData/CandRecord.h"
00005 #include "MinosObjectMap/MomNavigator.h"
00006 
00007 namespace DataUtil {
00008 
00028 template<class CandType>
00029 inline
00030 CandType* GetCandidate(const MomNavigator* mom, 
00031                        const char* cand_type=0,
00032                        const char* cand_name=0)
00033 {
00034     CandRecord* crec = dynamic_cast<CandRecord*> 
00035         (mom->GetFragment("CandRecord","PrimaryCandidateRecord"));
00036     if (!crec) return 0;
00037     return dynamic_cast<CandType*>(crec->FindCandHandle(cand_type,cand_name));
00038 }
00039 
00040 
00041 } // namespace DataUtil
00042 
00043 #endif  // GETCANDIDATE_H

Generated on Mon Feb 15 11:06:46 2010 for loon by  doxygen 1.3.9.1