ProcAllocatorTmpl< T > Class Template Reference
|
Ratpac-two
|
RAT::ProcAllocatorTmpl< T > Class Template Reference
#include <ProcAllocator.hh>
Inheritance diagram for RAT::ProcAllocatorTmpl< T >:
Public Member Functions | |
| virtual Processor * | operator() () |
Detailed Description
template<class T>
class RAT::ProcAllocatorTmpl< T >
Template for creating Processor factories.
This class exists because there is no notion of a "virtual constructor" in C++. In particular, it is used in ProcBlockManager::ProcBlockManager() to create a map which lets you take a string and construct a particular processor. The usage in that class is:
procAllocators["daq"]= new ProcAllocatorTmpl<DAQProc>; procAllocators["singlepe"]= new ProcAllocatorTmpl<SinglePEProc>; // etc, etc...
And later, it can then create an instance of FrontEndProc by doing this:
proc = (*procAllocators[procname])();
If this does not quite make sense, don't worry, you probably don't
need this class.
@param T Processor class instantiated by this factory. Must be
subclass of Processor.
Member Function Documentation
◆ operator()()
template<class T >
|
inlinevirtual |
Create new instance of processor subclass T
Implements RAT::ProcAllocator.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/include/RAT/ProcAllocator.hh
Generated by