GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Member Functions | Public Attributes | List of all members
gtsam::ValueWithDefault< T, defaultValue > Struct Template Reference

#include <types.h>

Collaboration diagram for gtsam::ValueWithDefault< T, defaultValue >:
Collaboration graph
[legend]

Public Member Functions

 ValueWithDefault ()
 
 ValueWithDefault (const T &_value)
 
T & operator* ()
 
const T & operator* () const
 
 operator T () const
 

Public Attributes

value
 

Detailed Description

template<typename T, T defaultValue>
struct gtsam::ValueWithDefault< T, defaultValue >

Helper struct that encapsulates a value with a default, this is just used as a member object so you don't have to specify defaults in the class constructor.

Constructor & Destructor Documentation

◆ ValueWithDefault() [1/2]

template<typename T, T defaultValue>
gtsam::ValueWithDefault< T, defaultValue >::ValueWithDefault ( )
inline

Default constructor, initialize to default value supplied in template argument

◆ ValueWithDefault() [2/2]

template<typename T, T defaultValue>
gtsam::ValueWithDefault< T, defaultValue >::ValueWithDefault ( const T &  _value)
inline

Initialize to the given value

Member Function Documentation

◆ operator T()

template<typename T, T defaultValue>
gtsam::ValueWithDefault< T, defaultValue >::operator T ( ) const
inline

Implicit conversion allows use in if statements for bool type, etc.

◆ operator*() [1/2]

template<typename T, T defaultValue>
T& gtsam::ValueWithDefault< T, defaultValue >::operator* ( )
inline

Operator to access the value

◆ operator*() [2/2]

template<typename T, T defaultValue>
const T& gtsam::ValueWithDefault< T, defaultValue >::operator* ( ) const
inline

Operator to access the value


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