GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gtsam::GenericValue< T > Class Template Reference

#include <GenericValue.h>

Inheritance diagram for gtsam::GenericValue< T >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::GenericValue< T >:
Collaboration graph
[legend]

Public Types

typedef T type
 

Public Member Functions

 GenericValue (const T &value)
 Construct from value.
 
const T & value () const
 Return a constant value.
 
T & value ()
 Return the value.
 
 ~GenericValue () override
 Destructor.
 
bool equals_ (const Value &p, double tol=1e-9) const override
 equals implementing generic Value interface
 
bool equals (const GenericValue &other, double tol=1e-9) const
 non virtual equals function, uses traits
 
void print (const std::string &str) const override
 Virtual print function, uses traits.
 
Valueclone_ () const override
 
void deallocate_ () const override
 
std::shared_ptr< Valueclone () const override
 
Valueretract_ (const Vector &delta) const override
 Generic Value interface version of retract.
 
Vector localCoordinates_ (const Value &value2) const override
 Generic Value interface version of localCoordinates.
 
GenericValue retract (const Vector &delta) const
 Non-virtual version of retract.
 
Vector localCoordinates (const GenericValue &value2) const
 Non-virtual version of localCoordinates.
 
size_t dim () const override
 Return run-time dimensionality.
 
Valueoperator= (const Value &rhs) override
 Assignment operator.
 
template<typename ValueType >
const ValueType & cast () const
 

Protected Member Functions

GenericValue< T > & operator= (const GenericValue< T > &rhs)
 

Protected Attributes

value_
 The wrapped value.
 

Detailed Description

template<class T>
class gtsam::GenericValue< T >

Wraps any type T so it can play as a Value

Member Function Documentation

◆ cast()

template<typename ValueType >
const ValueType & gtsam::Value::cast ( ) const
inherited

Cast to known ValueType

◆ clone()

template<class T>
std::shared_ptr<Value> gtsam::GenericValue< T >::clone ( ) const
inlineoverridevirtual

Clone this value (normal clone on the heap, delete with 'delete' operator)

Implements gtsam::Value.

◆ clone_()

template<class T>
Value* gtsam::GenericValue< T >::clone_ ( ) const
inlineoverridevirtual

Create a duplicate object returned as a pointer to the generic Value interface.

Implements gtsam::Value.

◆ deallocate_()

template<class T>
void gtsam::GenericValue< T >::deallocate_ ( ) const
inlineoverridevirtual

Destroy and deallocate this object, only if it was originally allocated using clone_().

Implements gtsam::Value.

◆ operator=()

template<class T>
GenericValue<T>& gtsam::GenericValue< T >::operator= ( const GenericValue< T > &  rhs)
inlineprotected

Assignment operator, protected because only the Value or DERIVED assignment operators should be used.


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