DetectorGraph  2.0
Public Member Functions | List of all members
DetectorGraph::SubscriberInterface< T > Class Template Referenceabstract

A Pure interface that declares the Subscriber behavior. More...

Collaboration diagram for DetectorGraph::SubscriberInterface< T >:

Public Member Functions

virtual void Evaluate (const T &)=0
 Pure-virtual method that should Evaluate a piece of input data. More...
 

Detailed Description

template<class T>
class DetectorGraph::SubscriberInterface< T >

A Pure interface that declares the Subscriber behavior.

Detectors inherit from a number of versions of this interface to declare their input set.

A class FooDetector acquires the "Subscriber of BarTopicState" behavior by inheriting SubscriberInterface templated to BarTopicState.

class FooDetector :
public Detector,
public SubscriberInterface<BarTopicState>
{
// ...
}

This interface serves a tiny purpose:

To enable the subscription Detectors must call Detector::Subscribe from the inheriting Detector's constructor:

class FooDetector :
public Detector,
public SubscriberInterface<BarTopicState>
{
FooDetector(Graph* graph) : Detector(graph)
{
Subscribe<BarTopicState>(this);
}
}

Definition at line 59 of file subscriberinterface.hpp.

Member Function Documentation

◆ Evaluate()

template<class T>
virtual void DetectorGraph::SubscriberInterface< T >::Evaluate ( const T &  )
pure virtual

Pure-virtual method that should Evaluate a piece of input data.

Implemented in DetectorGraph::Lag< T >, and DetectorGraph::TestSplitterDetector< OutA, OutB >.


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