ubuntu-location-service: com::ubuntu::location::Update< T > Struct Template Reference

ubuntu-location-service .. An aggregating location service providing positioning and geocoding capabilities to applications.

Public Member Functions | Public Attributes | List of all members
com::ubuntu::location::Update< T > Struct Template Reference

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

`#include <update.h>`

Collaboration diagram for com::ubuntu::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. More...
bool | operator== (const Update< T > &rhs) const
| operator == checks if two updates are equal. More...
bool | operator!= (const Update< T > &rhs) const
| operator != checks if two updates are unequal. More...

## Public Attributes
T | value
Clock::Timestamp | when = Clock::beginning_of_time()

## Detailed Description

### template<typename T>
struct com::ubuntu::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::ubuntu::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.

## Member Function Documentation

## ◆ operator!=()

template<typename T >

bool com::ubuntu::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 com::ubuntu::location::Update< T >::value, and com::ubuntu::location::Update< T >::when.

## ◆ operator==()

template<typename T >

bool com::ubuntu::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 com::ubuntu::location::Update< T >::value, and com::ubuntu::location::Update< T >::when.

## Member Data Documentation

## ◆ value

template<typename T >

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

The value delivered with this update.

Definition at line 70 of file update.h.

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

## ◆ when

template<typename T >

Clock::Timestamp com::ubuntu::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::ubuntu::location::Update< T > >::decode_argument(), core::dbus::Codec< com::ubuntu::location::Update< T > >::encode_argument(), com::ubuntu::location::Update< T >::operator!=(), com::ubuntu::location::operator<<(), and com::ubuntu::location::Update< T >::operator==().

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

- /build/location-service-git/src/location-service/include/location_service/com/ubuntu/location/update.h