template<typename T>
class maliput::drake::systems::internal::ValueToVectorValue< T >
Implements Drake policy for taking a concrete vector type and storing it in a Drake numerical vector object as an AbstractValue of concrete type Value<BasicVector<T>>
.
We call this "VectorPolicy" to distinguish it from the "AbstractPolicy" implemented by ValueToAbstractValue.
- See also
- ValueToAbstractValue for usage information and some restrictions.
VectorPolicy
- Any Eigen vector type is copied into a
Value<BasicVector<T>>
.
- A scalar of type T is treated as though it were an Eigen Vector1<T>.
- Any BasicVector or type derived from BasicVector is cloned into a
Value<BasicVector<T>>
although the stored object still has the most-derived type.
- Any AbstractValue object is simply cloned. The resulting clone must have exactly type
Value<BasicVector<T>>
or an std::logic_error is thrown.
Any other type results in an std::logic_error being thrown (at runtime). This internal class is intended to be invoked by different user-visible APIs so provides for the API name to be included in any generated runtime error messages.
@tparam_default_scalar