Drake
leaf_state_vector.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Eigen/Dense>
4 
6 
7 namespace drake {
8 namespace systems {
9 
16 template <typename T>
17 class LeafStateVector : public StateVector<T> {
18  public:
23  std::unique_ptr<LeafStateVector<T>> Clone() const {
24  return std::unique_ptr<LeafStateVector<T>>(DoClone());
25  }
26 
27  protected:
29 
35  virtual LeafStateVector<T>* DoClone() const = 0;
36 
37  private:
38  // LeafStateVector objects are neither copyable nor moveable.
39  LeafStateVector(const LeafStateVector& other) = delete;
40  LeafStateVector& operator=(const LeafStateVector& other) = delete;
41  LeafStateVector(LeafStateVector&& other) = delete;
42  LeafStateVector& operator=(LeafStateVector&& other) = delete;
43 };
44 
45 } // namespace systems
46 } // namespace drake
std::unique_ptr< LeafStateVector< T > > Clone() const
Copies the entire state to a new LeafStateVector.
Definition: leaf_state_vector.h:23
Definition: constants.h:3
StateVector is an abstract base class template for vector quantities within the state of a System...
Definition: state_vector.h:20
LeafStateVector is an abstract class template that implements StateVector for leaf Systems...
Definition: leaf_state_vector.h:17
virtual LeafStateVector< T > * DoClone() const =0
Returns a new LeafStateVector containing a copy of the entire state.
LeafStateVector()
Definition: leaf_state_vector.h:28