Ocean
Ocean::Tracking::Offline::ComponentEvent Class Reference

This class implements the base class for all component events. More...

Inheritance diagram for Ocean::Tracking::Offline::ComponentEvent:

Public Types

enum  ComponentEventSubType { CEST_INVALID = 0 , CEST_TRACKER_PROCESS , CEST_ANALYSIS , CEST_TRACKING }
 Definition of individual component event sub-types. More...
 
enum  ComponentState { CS_STARTED , CS_FINISHED , CS_FAILED , CS_BROKE }
 Definition of individual component states. More...
 

Public Member Functions

std::string subtypeName () const override
 Returns the sub-type name of this event object. More...
 
ComponentState state () const
 Returns the state of the component event. More...
 
std::string stateName () const
 Returns the state of this event. More...
 
void setState (const ComponentState state)
 Sets or changes the state of this component event. More...
 
- Public Member Functions inherited from Ocean::Tracking::Offline::TrackerEvent
unsigned int trackerId () const
 Returns the unique id of the tracker that sent this event. More...
 
std::string typeName () const
 Returns the type name of this event. More...
 
- Public Member Functions inherited from Ocean::Event
virtual ~Event ()
 Destructs an event object. More...
 
unsigned int type () const
 Returns the type of this event. More...
 
unsigned int subtype () const
 Returns the sub-type of this event. More...
 
template<typename T >
const T & cast () const
 Casts this event to an event with specified type. More...
 
template<typename T >
T & cast ()
 Casts this event to an event with specified type. More...
 

Protected Member Functions

 ComponentEvent (const unsigned int subtype, const unsigned int trackerId, const ComponentState state)
 Creates a new component event object. More...
 
- Protected Member Functions inherited from Ocean::Tracking::Offline::TrackerEvent
 TrackerEvent (const unsigned int type, const unsigned int subtype, const unsigned int trackerId)
 Creates a new tracker event object. More...
 
- Protected Member Functions inherited from Ocean::Event
 Event (const unsigned int type, const unsigned int subtype)
 Creates a new event object. More...
 

Protected Attributes

ComponentState eventState
 The state of the component that sent this event. More...
 
- Protected Attributes inherited from Ocean::Tracking::Offline::TrackerEvent
unsigned int trackerId_ = 0u
 The unique tracker id of the tracker that sent this event. More...
 
- Protected Attributes inherited from Ocean::Event
unsigned int eventType
 The type of the event. More...
 
unsigned int eventSubtype
 The sub-type of the event. More...
 

Detailed Description

This class implements the base class for all component events.

Component events are sent whenever an individual component is started, finished or if the component fails.

Member Enumeration Documentation

◆ ComponentEventSubType

Definition of individual component event sub-types.

Enumerator
CEST_INVALID 

An invalid event sub-type.

CEST_TRACKER_PROCESS 

An tracker process sub-type event.

CEST_ANALYSIS 

An analysis sub-type event.

CEST_TRACKING 

A tracking sub-type event.

◆ ComponentState

Definition of individual component states.

Enumerator
CS_STARTED 

The component started.

CS_FINISHED 

The component finished.

CS_FAILED 

The component failed.

CS_BROKE 

The component broke due to an external request.

Constructor & Destructor Documentation

◆ ComponentEvent()

Ocean::Tracking::Offline::ComponentEvent::ComponentEvent ( const unsigned int  subtype,
const unsigned int  trackerId,
const ComponentState  state 
)
inlineprotected

Creates a new component event object.

Parameters
subtypeThe subtype of the event
trackerIdUnique id of the tracker that sent this event
stateThe state of the component that sent this event

Member Function Documentation

◆ setState()

void Ocean::Tracking::Offline::ComponentEvent::setState ( const ComponentState  state)
inline

Sets or changes the state of this component event.

Parameters
stateNew state to be set

◆ state()

ComponentEvent::ComponentState Ocean::Tracking::Offline::ComponentEvent::state ( ) const
inline

Returns the state of the component event.

Returns
Component state

◆ stateName()

std::string Ocean::Tracking::Offline::ComponentEvent::stateName ( ) const

Returns the state of this event.

Returns
Component state

◆ subtypeName()

std::string Ocean::Tracking::Offline::ComponentEvent::subtypeName ( ) const
overridevirtual

Returns the sub-type name of this event object.

See also
TrackerEvent::subtypeName().

Implements Ocean::Tracking::Offline::TrackerEvent.

Field Documentation

◆ eventState

ComponentState Ocean::Tracking::Offline::ComponentEvent::eventState
protected

The state of the component that sent this event.


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