Drake
DependentInputPortValue Class Reference

A DependentInputPortValue wraps a pointer to an OutputPortValue associated with one System for use as an input to another System. More...

#include <systems/framework/input_port_value.h>

Inheritance diagram for DependentInputPortValue:
[legend]
Collaboration diagram for DependentInputPortValue:
[legend]

Public Member Functions

 DependentInputPortValue (OutputPortValue *output_port_value)
 Creates an input port value source connected to the given output_port_value, which must not be nullptr. More...
 
 ~DependentInputPortValue () override
 Disconnects from the output port. More...
 
void Disconnect () override
 Sets the associated OutputPortValue to nullptr. More...
 
int64_t get_version () const override
 Returns the value version of the connected output port. More...
 
bool requires_evaluation () const override
 A DependentInputPortValue must be evaluated in a Context, because it does not control its own data. More...
 
Does not allow copy, move, or assignment
 DependentInputPortValue (const DependentInputPortValue &)=delete
 
DependentInputPortValueoperator= (const DependentInputPortValue &)=delete
 
 DependentInputPortValue (DependentInputPortValue &&)=delete
 
DependentInputPortValueoperator= (DependentInputPortValue &&)=delete
 
- Public Member Functions inherited from InputPortValue
 ~InputPortValue () override
 
const AbstractValueget_abstract_data () const
 Returns the data on this port, which must be connected to a value source. More...
 
template<typename T >
const BasicVector< T > * get_vector_data () const
 Returns the vector data on this port, which must be connected to a value source. More...
 
void set_invalidation_callback (std::function< void()> callback)
 Registers callback to be called whenever the value source on which this InputPortValue depends. More...
 
void Invalidate () override
 Receives notification that the value source on which this InputPortValue depends has changed, and calls the invalidation callback. More...
 
 InputPortValue (const InputPortValue &)=delete
 
InputPortValueoperator= (const InputPortValue &)=delete
 
 InputPortValue (InputPortValue &&)=delete
 
InputPortValueoperator= (InputPortValue &&)=delete
 
- Public Member Functions inherited from OutputPortListenerInterface
 OutputPortListenerInterface ()
 
virtual ~OutputPortListenerInterface ()
 
 OutputPortListenerInterface (const OutputPortListenerInterface &)=delete
 
OutputPortListenerInterfaceoperator= (const OutputPortListenerInterface &)=delete
 
 OutputPortListenerInterface (OutputPortListenerInterface &&)=delete
 
OutputPortListenerInterfaceoperator= (OutputPortListenerInterface &&)=delete
 

Protected Member Functions

const OutputPortValueget_output_port_value () const override
 
- Protected Member Functions inherited from InputPortValue
 InputPortValue ()
 

Detailed Description

A DependentInputPortValue wraps a pointer to an OutputPortValue associated with one System for use as an input to another System.

Many DependentInputPortValue objects may wrap a single OutputPortValue.

Constructor & Destructor Documentation

DependentInputPortValue ( OutputPortValue output_port_value)
explicit

Creates an input port value source connected to the given output_port_value, which must not be nullptr.

The OutputPortValue must outlive this DependentInputPortValue object.

Here is the call graph for this function:

~DependentInputPortValue ( )
override

Disconnects from the output port.

Here is the call graph for this function:

Member Function Documentation

void Disconnect ( )
overridevirtual

Sets the associated OutputPortValue to nullptr.

Implements OutputPortListenerInterface.

const OutputPortValue* get_output_port_value ( ) const
inlineoverrideprotectedvirtual

Implements InputPortValue.

int64_t get_version ( ) const
inlineoverridevirtual

Returns the value version of the connected output port.

Implements InputPortValue.

DependentInputPortValue& operator= ( const DependentInputPortValue )
delete
bool requires_evaluation ( ) const
inlineoverridevirtual

A DependentInputPortValue must be evaluated in a Context, because it does not control its own data.

Implements InputPortValue.


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