WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
WireCell::IComponent< Type > Class Template Reference

#include <IComponent.h>

Inheritance diagram for WireCell::IComponent< Type >:
Collaboration diagram for WireCell::IComponent< Type >:

Public Types

typedef std::shared_ptr< Type > pointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 

Public Member Functions

virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Detailed Description

template<class Type>
class WireCell::IComponent< Type >

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.

Member Typedef Documentation

◆ pointer

template<class Type>
typedef std::shared_ptr<Type> WireCell::IComponent< Type >::pointer

Access subclass facet by pointer.

Definition at line 33 of file IComponent.h.

◆ vector

template<class Type>
typedef std::vector<pointer> WireCell::IComponent< Type >::vector

Vector of shared pointers.

Definition at line 36 of file IComponent.h.

Constructor & Destructor Documentation

◆ ~IComponent()

template<class Type>
virtual WireCell::IComponent< Type >::~IComponent ( )
inlinevirtual

Definition at line 38 of file IComponent.h.


The documentation for this class was generated from the following file: