delphyne
MaliputRailcarState< T > Class Template Referencefinal

Detailed Description

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

Specializes BasicVector with specific getters and setters.

#include <src/gen/maliput_railcar_state.h>

Inheritance diagram for MaliputRailcarState< T >:
[legend]

Public Types

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

Public Member Functions

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

MoveAssignable

 MaliputRailcarState (const MaliputRailcarState &other)
 
 MaliputRailcarState (MaliputRailcarState &&other) noexcept
 
MaliputRailcarStateoperator= (const MaliputRailcarState &other)
 
MaliputRailcarStateoperator= (MaliputRailcarState &&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...
 
MaliputRailcarState< T > * DoClone () const final
 

Getters and Setters

const T & s () const
 The s-coordinate of the vehicle in a Lane-frame. More...
 
void set_s (const T &s)
 Setter that matches s(). More...
 
DRAKE_VECTOR_GEN_NODISCARD MaliputRailcarState< T > with_s (const T &s) const
 Fluent setter that matches s(). More...
 
const T & speed () const
 The speed of the vehicle in physical space. More...
 
void set_speed (const T &speed)
 Setter that matches speed(). More...
 
DRAKE_VECTOR_GEN_NODISCARD MaliputRailcarState< T > with_speed (const T &speed) const
 Fluent setter that matches speed(). 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 MaliputRailcarStateIndices::GetCoordinateNames(). More...
 

Member Typedef Documentation

◆ K

An abbreviation for our row index constants.

Constructor & Destructor Documentation

◆ MaliputRailcarState() [1/3]

Default constructor.

Sets all rows to their default value:

  • s defaults to 0.0 with unknown units.
  • speed defaults to 0.0 with unknown units.

◆ MaliputRailcarState() [2/3]

MaliputRailcarState ( const MaliputRailcarState< T > &  other)

◆ MaliputRailcarState() [3/3]

MaliputRailcarState ( MaliputRailcarState< T > &&  other)
noexcept

Member Function Documentation

◆ DoClone()

MaliputRailcarState<T>* DoClone ( ) const
final

◆ GetCoordinateNames()

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

◆ IsValid()

drake::boolean<T> IsValid ( ) const

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ s()

const T& s ( ) const

The s-coordinate of the vehicle in a Lane-frame.

◆ set_s()

void set_s ( const T &  s)

Setter that matches s().

◆ set_speed()

void set_speed ( const T &  speed)

Setter that matches speed().

◆ 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.

◆ speed()

const T& speed ( ) const

The speed of the vehicle in physical space.

◆ with_s()

DRAKE_VECTOR_GEN_NODISCARD MaliputRailcarState<T> with_s ( const T &  s) const

Fluent setter that matches s().

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

◆ with_speed()

DRAKE_VECTOR_GEN_NODISCARD MaliputRailcarState<T> with_speed ( const T &  speed) const

Fluent setter that matches speed().

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


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