Drake
|
This concrete class provides object semantics to an abstract VectorInterface by implementing a copy constructor and copy assignment using the VectorInterface's Clone()
method.
More...
#include <drake/systems/framework/vector_interface.h>
Public Member Functions | |
VectorObject () noexcept | |
Constructs an empty VectorObject. More... | |
VectorObject (std::unique_ptr< VectorInterface< T >> vector) noexcept | |
Takes over ownership of the provided VectorInterface object. More... | |
VectorObject (const VectorObject &source) | |
Copy constructor uses the source object's Clone() method to make a deep copy which is then owned by this VectorObject. More... | |
VectorObject (VectorObject &&source) noexcept | |
Move construction leaves source empty. More... | |
VectorObject & | operator= (const VectorObject &source) |
Copy assignment replaces the current contents of this VectorObject with a clone of the source object. More... | |
VectorObject & | operator= (VectorObject &&source) noexcept |
Move assignment leaves source empty. More... | |
const VectorInterface< T > & | get_vector () const |
Returns a const reference to the VectorInterface object owned by this VectorObject, if any. More... | |
VectorInterface< T > * | get_mutable_vector () |
Returns a mutable pointer to the VectorInterface object owned by this VectorObject, if any. More... | |
bool | empty () const noexcept |
Returns true if this VectorObject does not own a VectorInterface object. More... | |
This concrete class provides object semantics to an abstract VectorInterface by implementing a copy constructor and copy assignment using the VectorInterface's Clone()
method.
A VectorObject is default-, copy-, and move-constructible, and copy- and move-assignable.
|
inlinenoexcept |
Constructs an empty VectorObject.
|
inlineexplicitnoexcept |
Takes over ownership of the provided VectorInterface object.
|
inline |
Copy constructor uses the source
object's Clone()
method to make a deep copy which is then owned by this VectorObject.
|
inlinenoexcept |
Move construction leaves source
empty.
|
inlinenoexcept |
Returns true
if this VectorObject does not own a VectorInterface object.
Check this first before calling get_vector() or get_mutable_vector().
|
inline |
Returns a mutable pointer to the VectorInterface object owned by this VectorObject, if any.
Don't call this on an empty object; check first with empty() if you aren't sure.
std::logic_error | This object is empty. |
|
inline |
Returns a const reference to the VectorInterface object owned by this VectorObject, if any.
Don't call this on an empty object; check first with empty() if you aren't sure.
std::logic_error | This object is empty. |
|
inline |
Copy assignment replaces the current contents of this VectorObject with a clone of the source
object.
|
inlinenoexcept |
Move assignment leaves source
empty.