#include <CModuleCommand.h>
Collaboration diagram for CModuleCommand:
Public Types | |
typedef list< CModuleCreator * > | CreatorList |
typedef CreatorList::iterator | CreatorIterator |
typedef list< CModuleCreator * > | CreatorList |
typedef CreatorList::iterator | CreatorIterator |
Public Member Functions | |
CModuleCommand (CTCLInterpreter *pInterp, CDigitizerDictionary *pDictionary, const string &command=string("module")) | |
virtual | ~CModuleCommand () |
CDigitizerDictionary & | getModules () |
CreatorList | getCreators () const |
virtual int | operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
void | AddCreator (CModuleCreator *pCreator) |
CreatorIterator | CreatorBegin () |
CreatorIterator | CreatorEnd () |
int | CreatorSize () |
CDigitizerDictionary::ModuleIterator | DigitizerBegin () |
CDigitizerDictionary::ModuleIterator | DigitizerEnd () |
int | DigitizerSize () |
CDigitizerDictionary::ModuleIterator | DigitizerFind (const string &rName) |
string | Usage () |
CModuleCommand (CTCLInterpreter *pInterp, CDigitizerDictionary *pDictionary, CReadOrder *pReader, const string &command=string("module")) | |
virtual | ~CModuleCommand () |
CDigitizerDictionary & | getModules () |
CreatorList | getCreators () const |
virtual int | operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
void | AddCreator (CModuleCreator *pCreator) |
CreatorIterator | CreatorBegin () |
CreatorIterator | CreatorEnd () |
int | CreatorSize () |
CDigitizerDictionary::ModuleIterator | DigitizerBegin () |
CDigitizerDictionary::ModuleIterator | DigitizerEnd () |
int | DigitizerSize () |
CDigitizerDictionary::ModuleIterator | DigitizerFind (const string &rName) |
string | Usage () |
Protected Member Functions | |
void | setModules (CDigitizerDictionary *pModules) |
void | setCreators (const CreatorList &creators) |
int | Create (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | List (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | Delete (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | ListTypes (CTCLInterpreter &rinterp, CTCLResult &rResult, int nArgs, char **pArgs) |
CreatorIterator | FindCreator (const string &ModuleType) |
int | Create (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | List (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | Delete (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
int | ListTypes (CTCLInterpreter &rinterp, CTCLResult &rResult, int nArgs, char **pArgs) |
void | setModules (CDigitizerDictionary *pModules) |
void | setCreators (const CreatorList &creators) |
Private Member Functions | |
CModuleCommand (const CModuleCommand &aCModuleCommand) | |
CModuleCommand & | operator= (const CModuleCommand &rhs) |
int | operator== (const CModuleCommand &rhs) const |
int | operator!= (const CModuleCommand &rhs) const |
CModuleCommand (const CModuleCommand &aCModuleCommand) | |
CModuleCommand & | operator= (const CModuleCommand &rhs) |
int | operator== (const CModuleCommand &rhs) const |
int | operator!= (const CModuleCommand &rhs) const |
Private Attributes | |
CDigitizerDictionary * | m_pModules |
Created module lookup. | |
CreatorList | m_Creators |
List of Creators. | |
CDigitizerDictionary * | m_pModules |
Created module lookup. | |
CReadOrder * | m_pReader |
Reader. |
The module command relies on the recognizer pattern. m_Creators is a list of module type creators. The creational form of the module command iterates through the set of creators looking for one that matches the type keword. When one is found it is used to create the actual module.
This object is a singleton object.
Definition at line 346 of file CModuleCommand.h.
|
Definition at line 343 of file include/CModuleCommand.h. |
|
Definition at line 351 of file CModuleCommand.h. Referenced by Create(), and FindCreator(). |
|
Definition at line 342 of file include/CModuleCommand.h. |
|
Definition at line 350 of file CModuleCommand.h. Referenced by getCreators(), and setCreators(). |
|
Constructor. This is essentially a no-op since STL containers are capable of default initialization. Definition at line 314 of file CModuleCommand.cpp. References pDictionary(), and pInterp(). |
|
Destroy the module command. Assumptions:
Definition at line 329 of file CModuleCommand.cpp. |
|
|
|
Constructor. This is essentially a no-op since STL containers are capable of default initialization. Definition at line 353 of file src/CModuleCommand.cpp. References pDictionary(), pInterp(), and pReader(). |
|
|
|
|
|
|
|
Add a module creator to the list of module creators checked during the module create command.
Definition at line 686 of file CModuleCommand.cpp. References m_Creators, and pCreator(). Referenced by InitializeConfigurator(). |
|
|
|
Function: Executes the command to create a new digitization module. The form of this command is: module name type {configuration}
m_Creators is iterated through. At each iteration, the entry's Match function is called to determine if the module creator is suitable for the module type. If so, the Creator's create member is called to create and configure a new module.
Definition at line 443 of file CModuleCommand.cpp. References CreatorEnd(), CreatorIterator, CDigitizerDictionary::DigitizerAdd(), DigitizerEnd(), DigitizerFind(), FindCreator(), m_pModules, and Usage(). Referenced by operator()(). |
|
|
|
Returns an iterator to the front of the creator list: Definition at line 696 of file CModuleCommand.cpp. References m_Creators. Referenced by FindCreator(), and ListTypes(). |
|
|
|
Returns an end of iteration iterator to the creation list: Definition at line 704 of file CModuleCommand.cpp. References m_Creators. Referenced by Create(), FindCreator(), and ListTypes(). |
|
|
|
Returns the number of modules in the creator list. Definition at line 712 of file CModuleCommand.cpp. References m_Creators. |
|
|
|
Deletes a module from the module list. If the module is part of the readout it is removed from the readout. The form of the command is: module delete name
Definition at line 589 of file CModuleCommand.cpp. References DigitizerEnd(), DigitizerFind(), m_pModules, CDigitizerDictionary::ModuleIterator, CReadableObject::OnDelete(), CDigitizerDictionary::Remove(), and Usage(). Referenced by operator()(). |
|
|
|
Returns an iterator to the front of the created modules Dictionary. Definition at line 721 of file CModuleCommand.cpp. References CDigitizerDictionary::DigitizerBegin(), and m_pModules. Referenced by List(). |
|
|
|
Returns an end of iteration iterator to the created modules Dictionary.. Definition at line 730 of file CModuleCommand.cpp. References CDigitizerDictionary::DigitizerEnd(), and m_pModules. |
|
Definition at line 418 of file include/CModuleCommand.h. References CDigitizerDictionary::DigitizerFind(), m_pModules, and CDigitizerDictionary::ModuleIterator. |
|
Definition at line 442 of file CModuleCommand.h. References CDigitizerDictionary::DigitizerFind(), m_pModules, and CDigitizerDictionary::ModuleIterator. |
|
|
|
Returns the number of modules that have been created: Definition at line 738 of file CModuleCommand.cpp. References CDigitizerDictionary::DigitizerSize(), and m_pModules. |
|
Locate a module creator that matches the creation name.
Definition at line 779 of file CModuleCommand.cpp. References CreatorBegin(), CreatorEnd(), and CreatorIterator. Referenced by Create(). |
|
Definition at line 389 of file include/CModuleCommand.h. References CreatorList, and m_Creators. |
|
Definition at line 413 of file CModuleCommand.h. References CreatorList, and m_Creators. |
|
Definition at line 385 of file include/CModuleCommand.h. References m_pModules. |
|
Definition at line 409 of file CModuleCommand.h. References m_pModules. |
|
|
|
Lists the set of modules that have been created. The form of this command is module -list ?pattern?
Definition at line 528 of file CModuleCommand.cpp. References DigitizerBegin(), DigitizerEnd(), and Usage(). Referenced by operator()(). |
|
|
|
Lists the types of modules that can be created. Iterates through the m_Creators and asks each of them for their help text. The form of the help text is expected to be: type - description of modules of this type
Definition at line 655 of file CModuleCommand.cpp. References CreatorBegin(), CreatorEnd(), and Usage(). Referenced by operator()(). |
|
|
|
|
|
|
|
Processes the module command. This level just determines the type of module command and dispatches to the associated member function accordingly. We pass control to protected member functions that process the cases:
Definition at line 362 of file CModuleCommand.cpp. References Create(), Delete(), List(), ListTypes(), and Usage(). |
|
|
|
|
|
|
|
|
|
Definition at line 401 of file include/CModuleCommand.h. References CreatorList, and m_Creators. |
|
Definition at line 425 of file CModuleCommand.h. References CreatorList, and m_Creators. |
|
Definition at line 397 of file include/CModuleCommand.h. References m_pModules. |
|
Definition at line 421 of file CModuleCommand.h. References m_pModules. |
|
|
|
Returns command usage information. Definition at line 746 of file CModuleCommand.cpp. Referenced by Create(), Delete(), List(), ListTypes(), and operator()(). |
|
List of Creators.
Definition at line 350 of file include/CModuleCommand.h. Referenced by AddCreator(), CreatorBegin(), CreatorEnd(), CreatorSize(), getCreators(), and setCreators(). |
|
Created module lookup.
Definition at line 349 of file include/CModuleCommand.h. |
|
Created module lookup.
Definition at line 357 of file CModuleCommand.h. Referenced by Create(), Delete(), DigitizerBegin(), DigitizerEnd(), DigitizerFind(), DigitizerSize(), getModules(), and setModules(). |
|
Reader.
Definition at line 351 of file include/CModuleCommand.h. |