delphyne
SimpleCarState< T > Class Template Referencefinal

Detailed Description

template<typename T>
class delphyne::SimpleCarState< T >

Specializes BasicVector with specific getters and setters.

#include <src/gen/simple_car_state.h>

Inheritance diagram for SimpleCarState< T >:
[legend]

Public Types

typedef SimpleCarStateIndices K
 An abbreviation for our row index constants. More...
 

Public Member Functions

 SimpleCarState ()
 Default constructor. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible,

MoveAssignable

 SimpleCarState (const SimpleCarState &other)
 
 SimpleCarState (SimpleCarState &&other) noexcept
 
SimpleCarStateoperator= (const SimpleCarState &other)
 
SimpleCarStateoperator= (SimpleCarState &&other) noexcept
 
template<typename U = T>
std::enable_if< std::is_same< U, drake::symbolic::Expression >::value >::type SetToNamedVariables ()
 Create a drake::symbolic::Variable for each element with the known variable name. More...
 
SimpleCarState< T > * DoClone () const final
 

Getters and Setters

const T & x () const
 x More...
 
void set_x (const T &x)
 Setter that matches x(). More...
 
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > with_x (const T &x) const
 Fluent setter that matches x(). More...
 
const T & y () const
 y More...
 
void set_y (const T &y)
 Setter that matches y(). More...
 
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > with_y (const T &y) const
 Fluent setter that matches y(). More...
 
const T & heading () const
 heading More...
 
void set_heading (const T &heading)
 Setter that matches heading(). More...
 
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > with_heading (const T &heading) const
 Fluent setter that matches heading(). More...
 
const T & velocity () const
 velocity More...
 
void set_velocity (const T &velocity)
 Setter that matches velocity(). More...
 
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > with_velocity (const T &velocity) const
 Fluent setter that matches velocity(). More...
 
drake::boolean< T > IsValid () const
 Returns whether the current values of this vector are well-formed. More...
 
static const std::vector< std::string > & GetCoordinateNames ()
 See SimpleCarStateIndices::GetCoordinateNames(). More...
 

Member Typedef Documentation

◆ K

An abbreviation for our row index constants.

Constructor & Destructor Documentation

◆ SimpleCarState() [1/3]

Default constructor.

Sets all rows to their default value:

  • x defaults to 0.0 with unknown units.
  • y defaults to 0.0 with unknown units.
  • heading defaults to 0.0 with unknown units.
  • velocity defaults to 0.0 with unknown units.

◆ SimpleCarState() [2/3]

SimpleCarState ( const SimpleCarState< T > &  other)

◆ SimpleCarState() [3/3]

SimpleCarState ( SimpleCarState< T > &&  other)
noexcept

Member Function Documentation

◆ DoClone()

SimpleCarState<T>* DoClone ( ) const
final

◆ GetCoordinateNames()

static const std::vector<std::string>& GetCoordinateNames ( )
static

◆ heading()

const T& heading ( ) const

heading

◆ IsValid()

drake::boolean<T> IsValid ( ) const

Returns whether the current values of this vector are well-formed.

◆ operator=() [1/2]

SimpleCarState& operator= ( const SimpleCarState< T > &  other)

◆ operator=() [2/2]

SimpleCarState& operator= ( SimpleCarState< T > &&  other)
noexcept

◆ set_heading()

void set_heading ( const T &  heading)

Setter that matches heading().

◆ set_velocity()

void set_velocity ( const T &  velocity)

Setter that matches velocity().

◆ set_x()

void set_x ( const T &  x)

Setter that matches x().

◆ set_y()

void set_y ( const T &  y)

Setter that matches y().

◆ SetToNamedVariables()

std::enable_if<std::is_same<U, drake::symbolic::Expression>::value>::type SetToNamedVariables ( )

Create a drake::symbolic::Variable for each element with the known variable name.

This is only available for T == drake::symbolic::Expression.

◆ velocity()

const T& velocity ( ) const

velocity

◆ with_heading()

DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_heading ( const T &  heading) const

Fluent setter that matches heading().

Returns a copy of this with heading set to a new value.

◆ with_velocity()

DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_velocity ( const T &  velocity) const

Fluent setter that matches velocity().

Returns a copy of this with velocity set to a new value.

◆ with_x()

DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_x ( const T &  x) const

Fluent setter that matches x().

Returns a copy of this with x set to a new value.

◆ with_y()

DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_y ( const T &  y) const

Fluent setter that matches y().

Returns a copy of this with y set to a new value.

◆ x()

const T& x ( ) const

x

◆ y()

const T& y ( ) const

y


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