Drake
UnrestrictedUpdateEvent< T > Class Template Referencefinal

This class represents an unrestricted update event. More...

#include <drake/systems/framework/event.h>

Inheritance diagram for UnrestrictedUpdateEvent< T >:
[legend]
Collaboration diagram for UnrestrictedUpdateEvent< T >:
[legend]

Public Types

typedef std::function< void(const Context< T > &, const UnrestrictedUpdateEvent< T > &, State< T > *)> UnrestrictedUpdateCallback
 Callback function that processes an unrestricted update event. More...
 
- Public Types inherited from Event< T >
enum  TriggerType {
  kUnknown, kInitialization, kForced, kTimed,
  kPeriodic, kPerStep, kWitness
}
 Predefined types of triggers. More...
 

Public Member Functions

void operator= (const UnrestrictedUpdateEvent &)=delete
 
 UnrestrictedUpdateEvent (UnrestrictedUpdateEvent &&)=delete
 
void operator= (UnrestrictedUpdateEvent &&)=delete
 
bool is_discrete_update () const override
 Returns true if this is a DiscreteUpdateEvent. More...
 
 UnrestrictedUpdateEvent ()
 Makes an UnrestrictedUpdateEvent with no trigger type, no event data, and no specified callback function. More...
 
 UnrestrictedUpdateEvent (const UnrestrictedUpdateCallback &callback)
 Makes a UnrestrictedUpdateEvent with no trigger type, no event data, and the specified callback function. More...
 
void add_to_composite (CompositeEventCollection< T > *events) const override
 Assuming that events is not null, this function makes a deep copy of this event and adds the deep copy to events's collection of unrestricted update events. More...
 
void handle (const Context< T > &context, State< T > *state) const
 Calls the optional callback function, if one exists, with context, this and discrete_state. More...
 
- Public Member Functions inherited from Event< T >
 Event ()
 Constructs an Event with no trigger type and no event data. More...
 
void operator= (const Event &)=delete
 
 Event (Event &&)=delete
 
void operator= (Event &&)=delete
 
virtual ~Event ()
 An object passed. More...
 
std::unique_ptr< EventClone () const
 Clones this instance. More...
 
TriggerType get_trigger_type () const
 Returns the trigger type. More...
 
bool has_event_data () const
 Returns true if this event has associated data. More...
 
const EventDataget_event_data () const
 Returns a const pointer to the event data. More...
 
EventDataget_mutable_event_data ()
 Returns a mutable pointer to the event data. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Event< T >
 Event (const Event &other)
 

Detailed Description

template<typename T>
class drake::systems::UnrestrictedUpdateEvent< T >

This class represents an unrestricted update event.

It has an optional callback function to do custom handling of this event given const Context and const UnrestrictedUpdateEvent object references, and writes the updates to a mutable, non-null State object.

Member Typedef Documentation

typedef std::function<void(const Context<T>&, const UnrestrictedUpdateEvent<T>&, State<T>*)> UnrestrictedUpdateCallback

Callback function that processes an unrestricted update event.

Constructor & Destructor Documentation

Makes an UnrestrictedUpdateEvent with no trigger type, no event data, and no specified callback function.

UnrestrictedUpdateEvent ( const UnrestrictedUpdateCallback callback)
inlineexplicit

Makes a UnrestrictedUpdateEvent with no trigger type, no event data, and the specified callback function.

Member Function Documentation

void add_to_composite ( CompositeEventCollection< T > *  events) const
inlineoverridevirtual

Assuming that events is not null, this function makes a deep copy of this event and adds the deep copy to events's collection of unrestricted update events.

Implements Event< T >.

Here is the call graph for this function:

void handle ( const Context< T > &  context,
State< T > *  state 
) const
inline

Calls the optional callback function, if one exists, with context, this and discrete_state.

Here is the call graph for this function:

bool is_discrete_update ( ) const
inlineoverridevirtual

Returns true if this is a DiscreteUpdateEvent.

Implements Event< T >.

void operator= ( const UnrestrictedUpdateEvent< T > &  )
delete
void operator= ( UnrestrictedUpdateEvent< T > &&  )
delete

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