com::lomiri::location::Update< T > Struct Template Reference

Templated class that wraps a value and timestamp. More...

`#include <update.h>`

Collaboration diagram for com::lomiri::location::Update< T >:

## Public Member Functions

| Update (const T &value=T{}, const Clock::Timestamp &when=Clock::now())
| Constructs a valid update with the given value and timestamp.
bool | operator== (const Update< T > &rhs) const
| operator == checks if two updates are equal.
bool | operator!= (const Update< T > &rhs) const
| operator != checks if two updates are unequal.

## Public Attributes

T | value
Clock::Timestamp | when = Clock::beginning_of_time()

## Detailed Description

template<typename T>
struct com::lomiri::location::Update< T >

Templated class that wraps a value and timestamp.

Template Parameters

  T | The contained value.

Definition at line 36 of file update.h.

## Constructor & Destructor Documentation

## Update()

template<typename T>

com::lomiri::location::Update< T >::Update | ( | const T & | value = T{},
|  | const Clock::Timestamp & | when = Clock::now() )

inline

Constructs a valid update with the given value and timestamp.

Parameters

  [in] | value | The value delivered with this update.
  [in] | when | The timestamp when the value was measured.

Definition at line 43 of file update.h.

References value.

Referenced by operator!=(), and operator==().

## Member Function Documentation

## operator!=()

template<typename T>

bool com::lomiri::location::Update< T >::operator!= | ( | const Update< T > & | rhs | ) | const

inline

operator != checks if two updates are unequal.

Parameters

  [in] | rhs | The update to check against.

Returns
  true iff this instance does not equal rhs.

Definition at line 64 of file update.h.

References Update(), value, and when.

Here is the call graph for this function:

## operator==()

template<typename T>

bool com::lomiri::location::Update< T >::operator== | ( | const Update< T > & | rhs | ) | const

inline

operator == checks if two updates are equal.

Parameters

  [in] | rhs | The update to check against.

Returns
  true iff this instance equals rhs.

Definition at line 54 of file update.h.

References Update(), value, and when.

Here is the call graph for this function:

## Member Data Documentation

## value

template<typename T>

T com::lomiri::location::Update< T >::value

The value delivered with this update.

Definition at line 70 of file update.h.

Referenced by core::dbus::Codec< com::lomiri::location::Update< T > >::decode_argument(), core::dbus::Codec< com::lomiri::location::Update< T > >::encode_argument(), operator!=(), com::lomiri::location::operator<<(), operator==(), and Update().

## when

template<typename T>

Clock::Timestamp com::lomiri::location::Update< T >::when = Clock::beginning_of_time()

Time when the updated value was measured.

Definition at line 73 of file update.h.

Referenced by core::dbus::Codec< com::lomiri::location::Update< T > >::decode_argument(), core::dbus::Codec< com::lomiri::location::Update< T > >::encode_argument(), operator!=(), com::lomiri::location::operator<<(), and operator==().

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

- update.h