Drake
DiagramCompositeEventCollection< T > Class Template Referencefinal

CompositeEventCollection for a Diagram. More...

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

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

Public Member Functions

 DiagramCompositeEventCollection (std::vector< std::unique_ptr< CompositeEventCollection< T >>> subevents)
 Allocated CompositeEventCollection for all constituent subsystems are passed in subevents, for which ownership is also transferred to this. More...
 
int num_subsystems () const
 Returns the number of subsystems for which this object contains event collections. More...
 
CompositeEventCollection< T > & get_mutable_subevent_collection (int index)
 
const CompositeEventCollection< T > & get_subevent_collection (int index) const
 
Does not allow copy, move, or assignment
 DiagramCompositeEventCollection (const DiagramCompositeEventCollection &)=delete
 
DiagramCompositeEventCollectionoperator= (const DiagramCompositeEventCollection &)=delete
 
 DiagramCompositeEventCollection (DiagramCompositeEventCollection &&)=delete
 
DiagramCompositeEventCollectionoperator= (DiagramCompositeEventCollection &&)=delete
 
- Public Member Functions inherited from CompositeEventCollection< T >
virtual ~CompositeEventCollection ()
 
void Clear ()
 Clears all the events. More...
 
bool HasEvents () const
 Returns true if and only if this collection contains any events. More...
 
bool HasPublishEvents () const
 Returns true if and only if this collection contains one or more publish events. More...
 
bool HasDiscreteUpdateEvents () const
 Returns true if and only if this collection contains one or more discrete update events. More...
 
bool HasUnrestrictedUpdateEvents () const
 Returns true if and only if this collection contains one or more unrestricted update events. More...
 
void add_publish_event (std::unique_ptr< PublishEvent< T >> event)
 Assuming the internal publish event collection is an instance of LeafEventCollection, adds the publish event event (ownership is also transferred) to it. More...
 
void add_discrete_update_event (std::unique_ptr< DiscreteUpdateEvent< T >> event)
 Assuming the internal discrete update event collection is an instance of LeafEventCollection, adds the discrete update event event (ownership is also transferred) to it. More...
 
void add_unrestricted_update_event (std::unique_ptr< UnrestrictedUpdateEvent< T >> event)
 Assuming the internal unrestricted update event collection is an instance of LeafEventCollection, adds the unrestricted update event event (ownership is also transferred) to it. More...
 
void Merge (const CompositeEventCollection< T > &other)
 Merges the contained homogeneous event collections (e.g., EventCollection<PublishEvent<T>>, EventCollection<DiscreteUpdateEvent<T>>, etc.) from this and other, storing the results in this. More...
 
void SetFrom (const CompositeEventCollection< T > &other)
 Copies the collections of homogeneous events from other to this. More...
 
const EventCollection< PublishEvent< T > > & get_publish_events () const
 Returns a const reference to the collection of publish events. More...
 
const EventCollection< DiscreteUpdateEvent< T > > & get_discrete_update_events () const
 Returns a const reference to the collection of discrete update events. More...
 
const EventCollection< UnrestrictedUpdateEvent< T > > & get_unrestricted_update_events () const
 Returns a const reference to the collection of unrestricted update events. More...
 
EventCollection< PublishEvent< T > > & get_mutable_publish_events () const
 Returns a mutable reference to the collection of publish events. More...
 
EventCollection< DiscreteUpdateEvent< T > > & get_mutable_discrete_update_events () const
 Returns a mutable reference to the collection of discrete update events. More...
 
EventCollection< UnrestrictedUpdateEvent< T > > & get_mutable_unrestricted_update_events () const
 Returns a mutable reference to the collection of unrestricted update events. More...
 
 CompositeEventCollection (const CompositeEventCollection &)=delete
 
CompositeEventCollectionoperator= (const CompositeEventCollection &)=delete
 
 CompositeEventCollection (CompositeEventCollection &&)=delete
 
CompositeEventCollectionoperator= (CompositeEventCollection &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from CompositeEventCollection< T >
 CompositeEventCollection (std::unique_ptr< EventCollection< PublishEvent< T >>> pub, std::unique_ptr< EventCollection< DiscreteUpdateEvent< T >>> discrete, std::unique_ptr< EventCollection< UnrestrictedUpdateEvent< T >>> unrestricted)
 Takes ownership of pub, discrete and unrestricted. More...
 

Detailed Description

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

CompositeEventCollection for a Diagram.

Constructor & Destructor Documentation

DiagramCompositeEventCollection ( std::vector< std::unique_ptr< CompositeEventCollection< T >>>  subevents)
inlineexplicit

Allocated CompositeEventCollection for all constituent subsystems are passed in subevents, for which ownership is also transferred to this.

Here is the call graph for this function:

Member Function Documentation

CompositeEventCollection<T>& get_mutable_subevent_collection ( int  index)
inline
const CompositeEventCollection<T>& get_subevent_collection ( int  index) const
inline
int num_subsystems ( ) const
inline

Returns the number of subsystems for which this object contains event collections.


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