Drake
OutputPortValue Class Reference

OutputPortValue contains the value of a single System output port. More...

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

Public Member Functions

template<template< typename T > class V, typename T >
 OutputPortValue (std::unique_ptr< V< T >> vec)
 Constructs a vector-valued OutputPortValue. More...
 
 OutputPortValue (std::unique_ptr< AbstractValue > data)
 Constructs an abstract-valued OutputPortValue. More...
 
template<typename T >
 OutputPortValue (std::unique_ptr< Value< T >> data)
 Constructs an abstract-valued OutputPortValue. More...
 
virtual ~OutputPortValue ()
 
const AbstractValueget_abstract_data () const
 Returns the abstract value in this port. More...
 
template<typename T >
const BasicVector< T > * get_vector_data () const
 Returns the vector of data in this output port. More...
 
AbstractValueGetMutableData ()
 Returns a pointer to the data inside this OutputPortValue. More...
 
template<typename T >
BasicVector< T > * GetMutableVectorData ()
 Returns a pointer to the data inside this OutputPortValue. More...
 
std::unique_ptr< OutputPortValueClone () const
 Returns a clone of this OutputPortValue containing a clone of the data, but without any dependents. More...
 
Does not allow copy, move, or assignment
 OutputPortValue (const OutputPortValue &)=delete
 
OutputPortValueoperator= (const OutputPortValue &)=delete
 
 OutputPortValue (OutputPortValue &&)=delete
 
OutputPortValueoperator= (OutputPortValue &&)=delete
 

Detailed Description

OutputPortValue contains the value of a single System output port.

Input ports of other Systems may depend on an OutputPortValue. When an OutputPortValue is deleted, it will automatically notify the listeners that depend on it to disconnect, meaning those ports will resolve to nullptr.

Constructor & Destructor Documentation

OutputPortValue ( const OutputPortValue )
delete
OutputPortValue ( std::unique_ptr< V< T >>  vec)
inlineexplicit

Constructs a vector-valued OutputPortValue.

Takes ownership of vec.

Template Parameters
TThe type of the vector data. Must be a valid Eigen scalar.
VThe type of vec itself. Must implement BasicVector<T>.
OutputPortValue ( std::unique_ptr< AbstractValue data)
inlineexplicit

Constructs an abstract-valued OutputPortValue.

Takes ownership of data.

OutputPortValue ( std::unique_ptr< Value< T >>  data)
inlineexplicit

Constructs an abstract-valued OutputPortValue.

Takes ownership of data.

Template Parameters
TThe type of the data.

Here is the call graph for this function:

~OutputPortValue ( )
virtual

Here is the caller graph for this function:

Member Function Documentation

std::unique_ptr< OutputPortValue > Clone ( ) const

Returns a clone of this OutputPortValue containing a clone of the data, but without any dependents.

Here is the call graph for this function:

Here is the caller graph for this function:

const AbstractValue* get_abstract_data ( ) const
inline

Returns the abstract value in this port.

const BasicVector<T>* get_vector_data ( ) const
inline

Returns the vector of data in this output port.

Throws std::bad_cast if this is not a vector-valued port.

AbstractValue* GetMutableData ( )
inline

Returns a pointer to the data inside this OutputPortValue.

BasicVector<T>* GetMutableVectorData ( )
inline

Returns a pointer to the data inside this OutputPortValue.

Throws std::bad_cast if this is not a vector-valued port.

Here is the call graph for this function:

OutputPortValue& operator= ( OutputPortValue &&  )
delete
OutputPortValue& operator= ( const OutputPortValue )
delete

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