Drake
AbstractValues Class Reference

AbstractValues is a container for non-numerical state and parameters. More...

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

Public Member Functions

 AbstractValues ()
 
 AbstractValues (std::vector< std::unique_ptr< AbstractValue >> &&data)
 Constructs an AbstractValues that owns the underlying data. More...
 
 AbstractValues (const std::vector< AbstractValue * > &data)
 Constructs an AbstractValues that does not own the underlying data. More...
 
 AbstractValues (std::unique_ptr< AbstractValue > datum)
 Constructs an AbstractValues that owns a single datum. More...
 
virtual ~AbstractValues ()
 
int size () const
 Returns the number of elements of AbstractValues. More...
 
const AbstractValueget_value (int index) const
 Returns the element of AbstractValues at the given index, or aborts if the index is out-of-bounds. More...
 
AbstractValueget_mutable_value (int index)
 Returns the element of AbstractValues at the given index, or aborts if the index is out-of-bounds. More...
 
void CopyFrom (const AbstractValues &other)
 Copies all of the AbstractValues in other into this. More...
 
std::unique_ptr< AbstractValuesClone () const
 Returns a deep copy of all the data in this AbstractValues. More...
 
Does not allow copy, move, or assignment
 AbstractValues (const AbstractValues &)=delete
 
AbstractValuesoperator= (const AbstractValues &)=delete
 
 AbstractValues (AbstractValues &&)=delete
 
AbstractValuesoperator= (AbstractValues &&)=delete
 

Detailed Description

AbstractValues is a container for non-numerical state and parameters.

It may or may not own the underlying data, and therefore is suitable for both leaf Systems and diagrams.

Template Parameters
TA mathematical type compatible with Eigen's Scalar.

Constructor & Destructor Documentation

AbstractValues ( const AbstractValues )
delete
AbstractValues ( AbstractValues &&  )
delete
AbstractValues ( std::vector< std::unique_ptr< AbstractValue >> &&  data)
explicit

Constructs an AbstractValues that owns the underlying data.

AbstractValues ( const std::vector< AbstractValue * > &  data)
explicit

Constructs an AbstractValues that does not own the underlying data.

AbstractValues ( std::unique_ptr< AbstractValue datum)
explicit

Constructs an AbstractValues that owns a single datum.

~AbstractValues ( )
virtual

Member Function Documentation

std::unique_ptr< AbstractValues > Clone ( ) const

Returns a deep copy of all the data in this AbstractValues.

The clone will own its own data. This is true regardless of whether the data being cloned had ownership of its data or not.

void CopyFrom ( const AbstractValues other)

Copies all of the AbstractValues in other into this.

Asserts if the two are not equal in size. Throws if any of the elements are of incompatible type.

Here is the call graph for this function:

AbstractValue & get_mutable_value ( int  index)

Returns the element of AbstractValues at the given index, or aborts if the index is out-of-bounds.

Here is the call graph for this function:

Here is the caller graph for this function:

const AbstractValue & get_value ( int  index) const

Returns the element of AbstractValues at the given index, or aborts if the index is out-of-bounds.

Here is the call graph for this function:

Here is the caller graph for this function:

AbstractValues& operator= ( AbstractValues &&  )
delete
AbstractValues& operator= ( const AbstractValues )
delete
int size ( ) const

Returns the number of elements of AbstractValues.

Here is the caller graph for this function:


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