Public Member Functions | Public Attributes | List of all members
gtsam::ValueWithDefault< T, defaultValue > Struct Template Reference

#include <types.h>

Public Member Functions

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

Public Attributes

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

Definition at line 134 of file types.h.

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

Definition at line 138 of file types.h.

◆ ValueWithDefault() [2/2]

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

Initialize to the given value

Definition at line 141 of file types.h.

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.

Definition at line 150 of file types.h.

◆ operator*() [1/2]

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

Operator to access the value

Definition at line 144 of file types.h.

◆ operator*() [2/2]

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

Operator to access the value

Definition at line 147 of file types.h.

Member Data Documentation

◆ value

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

Definition at line 135 of file types.h.


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


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:52:53