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 139 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 143 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 146 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 155 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 149 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 152 of file types.h.

Member Data Documentation

◆ value

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

Definition at line 140 of file types.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:15