#include <IComponent.h>
Public Types | |
typedef std::shared_ptr< Type > | pointer |
Access subclass facet by pointer. More... | |
typedef std::vector< pointer > | vector |
Vector of shared pointers. More... | |
Public Types inherited from WireCell::Interface | |
typedef std::shared_ptr< Interface > | pointer |
Public Member Functions | |
virtual | ~IComponent () |
Public Member Functions inherited from WireCell::Interface | |
virtual | ~Interface () |
A component calls out a particular interface as being identified as important to the system. Inheriting from IComponent follows the CRTP pattern:
class IMyComponent : public IComponent<IMyComponent> { public: void mymethod() = 0; };
class MyConcreteComponent : public IMyComponent { public: void mymethod(); };
IMyComponent::pointer mycomp(new MyConcreteComponent); mycomp->mymethod();
See WireCell::NamedFactory for one creation pattern that works with IComponents.
Definition at line 29 of file IComponent.h.
typedef std::shared_ptr<Type> WireCell::IComponent< Type >::pointer |
Access subclass facet by pointer.
Definition at line 33 of file IComponent.h.
typedef std::vector<pointer> WireCell::IComponent< Type >::vector |
Vector of shared pointers.
Definition at line 36 of file IComponent.h.
|
inlinevirtual |
Definition at line 38 of file IComponent.h.