Vuo  1.1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
VuoTriggerSet< TriggerDataType > Class Template Reference

Description

template<typename TriggerDataType>
class VuoTriggerSet< TriggerDataType >

Manages a set of callbacks for nodes' trigger ports.

It's safe for multiple threads to call addTrigger(), removeTrigger(), size(), and fire() on the same set.

Public Types

typedef void(* TriggerFunctionType )(TriggerDataType)
 A node's trigger method.
 

Public Member Functions

 VuoTriggerSet ()
 Creates a new trigger set.
 
 ~VuoTriggerSet ()
 Destroys the trigger set.
 
void addTrigger (TriggerFunctionType trigger)
 Adds a trigger method to the trigger set.
 
void removeTrigger (TriggerFunctionType trigger)
 Removes a trigger method from the trigger set.
 
unsigned int size (void)
 Returns the number of triggers in the trigger set.
 
void fire (TriggerDataType data)
 Fires all the triggers in the trigger set, passing them data.
 

Member Typedef Documentation

template<typename TriggerDataType>
typedef void(* VuoTriggerSet< TriggerDataType >::TriggerFunctionType)(TriggerDataType)

A node's trigger method.

Constructor & Destructor Documentation

template<typename TriggerDataType >
VuoTriggerSet< TriggerDataType >::VuoTriggerSet ( )

Creates a new trigger set.

template<typename TriggerDataType >
VuoTriggerSet< TriggerDataType >::~VuoTriggerSet ( )

Destroys the trigger set.

Member Function Documentation

template<typename TriggerDataType >
void VuoTriggerSet< TriggerDataType >::addTrigger ( TriggerFunctionType  trigger)

Adds a trigger method to the trigger set.

This function may be called from any thread.

template<typename TriggerDataType>
void VuoTriggerSet< TriggerDataType >::fire ( TriggerDataType  data)

Fires all the triggers in the trigger set, passing them data.

This function may be called from any thread.

template<typename TriggerDataType >
void VuoTriggerSet< TriggerDataType >::removeTrigger ( TriggerFunctionType  trigger)

Removes a trigger method from the trigger set.

This function may be called from any thread.

template<typename TriggerDataType >
unsigned int VuoTriggerSet< TriggerDataType >::size ( void  )

Returns the number of triggers in the trigger set.

This function may be called from any thread.


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