#include <algomaker.h>
Inheritance diagram for AlgoMaker:
Public Member Functions | |
virtual | ~AlgoMaker () |
Static Public Member Functions | |
static Algo * | newAlgo (const std::string &AlgoType, TrapperDoc *doc, std::set< db_recno_t > &recnoList, AlgoParam *param=0) |
static std::list< std::string > | algosRegistered () |
Protected Types | |
typedef std::map< std::string, AlgoMaker * > | MakerMap |
Protected Member Functions | |
AlgoMaker () | |
virtual Algo * | makeAlgo (TrapperDoc *doc, std::set< db_recno_t > &recnoList, AlgoParam *param)=0 |
virtual bool | algoIsPopup ()=0 |
Static Protected Member Functions | |
static MakerMap & | registry () |
Definition at line 26 of file algomaker.h.
|
Definition at line 38 of file algomaker.h. |
|
Definition at line 29 of file algomaker.h.
|
|
Definition at line 34 of file algomaker.h.
|
|
Implemented in AlgoMakerTP< AlgoType, algoName, algoShouldPopup >. |
|
Definition at line 19 of file algomaker.cpp. References registry(). Referenced by TrapperView::contentsContextMenuEvent(). 00020 { 00021 list<string> list; 00022 00023 for ( MakerMap::const_iterator it = registry().begin(); it != registry().end(); ++it ) 00024 { 00025 if ( it->second->algoIsPopup() )//NOTA BENE, maybe put this info in a separate map... 00026 list.push_back( it->first ); 00027 } 00028 return list; 00029 }
|
|
Implemented in AlgoMakerTP< AlgoType, algoName, algoShouldPopup >. Referenced by newAlgo(). |
|
Definition at line 41 of file algomaker.cpp. References makeAlgo(), and registry(). Referenced by TrapperView::runAlgo(). 00043 { 00044 AlgoMaker* maker = 00045 (*registry().find( AlgoType )).second; 00046 return maker ? maker->makeAlgo( doc, recnoList, param ) : NULL; 00047 }
|
|
Definition at line 31 of file algomaker.cpp. Referenced by AlgoMakerTP< AlgoType, algoName, algoShouldPopup >::AlgoMakerTP(), algosRegistered(), and newAlgo(). 00032 { 00033 /* We use this because static instances of sub classes of AlgoMaker 00034 make use of this map. The idea comes from c++ faq lite 00035 [10.12] How do I prevent the "static initialization order fiasco"? 00036 */ 00037 static AlgoMaker::MakerMap reg; 00038 return reg; 00039 }
|