Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::Sensor_Imp Class Reference
Inheritance diagram for trax::Sensor_Imp:

Public Member Functions

 Sensor_Imp (const Sensor_Imp &sensor)
 Sensor_Imp (Sensor_Imp &&)=default
Sensor_Imp & operator= (const Sensor_Imp &sensor)=delete
Sensor_Imp & operator= (Sensor_Imp &&)=delete
const char * TypeName () const noexcept override
const std::string & Reference (const std::string &name) const override
 Gets a reference that was set for this object by name.
void Reference (const std::string &name, const std::string &reference) override
IDType ID () const noexcept override
void ID (IDType id) noexcept override
void Trigger (const Event &_event) override
 Triggers this Sensor.
JackJackOnTrigger () noexcept override
 Gets a Jack that pulses its Plug if the sensor is triggering.
void RegisterSockets (SocketRegistry &module) override
 Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
void UnregisterSockets (SocketRegistry &module) override
 Removes all references to Plugs and Jacks from the module.
void Attach (TrackBuilder *pTrackBuilder) noexcept override
 Attach the pointer to the track to the sensor.
TrackBuilderTrackAttached () const noexcept override
int CountJacks () const noexcept override
Public Member Functions inherited from trax::ObjectID_Imp< Sensor >
const std::vector< char const * > & ReferenceNames (const std::string &namePart) const override
Public Member Functions inherited from trax::Identified< Sensor >
 Identified (const Identified &)=delete
Identified & operator= (const Identified &)=delete
Public Member Functions inherited from trax::JackEnumerator
JackGetJack (int idx)
const JackGetJack (int idx) const

Protected Member Functions

const Jack_GetJack (int idx) const override
Protected Member Functions inherited from trax::JackEnumerator
 JackEnumerator (const JackEnumerator &)=default
 JackEnumerator (JackEnumerator &&)=default
JackEnumerator & operator= (const JackEnumerator &)=default
JackEnumerator & operator= (JackEnumerator &&)=default

Additional Inherited Members

Public Types inherited from trax::JackEnumerator
typedef JackEnumerator collection_type
typedef Jack value_type
Static Public Member Functions inherited from trax::Sensor
static dclspc std::unique_ptr< SensorMake () noexcept
 Makes a Sensor object that triggers on all events.

Member Function Documentation

◆ _GetJack()

const Jack & trax::Sensor_Imp::_GetJack ( int idx) const
overrideprotectedvirtual

Implements trax::JackEnumerator.

◆ Attach()

void trax::Sensor_Imp::Attach ( TrackBuilder * pTrackBuilder)
overridevirtualnoexcept

Attach the pointer to the track to the sensor.

This message is called during attachement and detachment of a sensor. Never call it directly; implement it for user sensors.

Implements trax::Sensor.

◆ CountJacks()

int trax::Sensor_Imp::CountJacks ( ) const
overridevirtualnoexcept
Returns
The total number of jacks available through this interface.

Implements trax::JackEnumerator.

◆ ID()

IDType trax::Sensor_Imp::ID ( ) const
inlineoverridevirtualnoexcept
Returns
the object's id.

Reimplemented from trax::ObjectID_Imp< Sensor >.

◆ JackOnTrigger()

Jack & trax::Sensor_Imp::JackOnTrigger ( )
overridevirtualnoexcept

Gets a Jack that pulses its Plug if the sensor is triggering.

Implements trax::Sensor.

◆ Reference()

const std::string & trax::Sensor_Imp::Reference ( const std::string & name) const
inlineoverridevirtual

Gets a reference that was set for this object by name.

Parameters
nameName of the reference.
Returns
a reference string for additional data to the object.

Reimplemented from trax::ObjectID_Imp< Sensor >.

◆ RegisterSockets()

void trax::Sensor_Imp::RegisterSockets ( SocketRegistry & modul)
overridevirtual

Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.

Implements trax::Sensor.

◆ TrackAttached()

TrackBuilder * trax::Sensor_Imp::TrackAttached ( ) const
overridevirtualnoexcept
Returns
Pointer to the track this Sensor is attached to, or nullptr, if not attached.

Implements trax::Sensor.

◆ Trigger()

void trax::Sensor_Imp::Trigger ( const Event & _event)
overridevirtual

Triggers this Sensor.

Triggering means to pulse a registered Socket if a match between the Event and the sensor's fiter settings is found.

Parameters
_eventAn Event object that is used to filter wether the sensor should actually trigger.

Implements trax::Sensor.

◆ TypeName()

const char * trax::Sensor_Imp::TypeName ( ) const
overridevirtualnoexcept
Returns
the name for the object type that implements this interface.

Implements trax::Sensor.

◆ UnregisterSockets()

void trax::Sensor_Imp::UnregisterSockets ( SocketRegistry & modul)
overridevirtual

Removes all references to Plugs and Jacks from the module.

Implements trax::Sensor.


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