Astarte device API for C++ 0.8.1
Astarte device SDK for C++
Loading...
Searching...
No Matches
astarte::device::StoredProperty Class Reference

Represents a stored property on the device. More...

#include <stored_property.hpp>

Public Member Functions

 StoredProperty (std::string_view interface_name, std::string_view path, int32_t version_major, Ownership ownership, Data data)
 Constructs a new Stored Property instance.
 
auto get_interface_name () const -> const std::string &
 Retrieves the interface name.
 
auto get_path () const -> const std::string &
 Retrieves the property path.
 
auto get_version_major () const -> int32_t
 Retrieves the major version of the interface.
 
auto get_ownership () const -> const Ownership &
 Retrieves the ownership of the interface.
 
auto get_value () const -> const Data &
 Retrieves the value of the property.
 
auto operator== (const StoredProperty &other) const -> bool
 Equality comparison operator.
 
auto operator!= (const StoredProperty &other) const -> bool
 Inequality comparison operator.
 

Detailed Description

Represents a stored property on the device.

This class encapsulates the data and metadata of a property that is stored locally on the device, often used for synchronization with the Astarte platform.

Constructor & Destructor Documentation

◆ StoredProperty()

astarte::device::StoredProperty::StoredProperty ( std::string_view interface_name,
std::string_view path,
int32_t version_major,
Ownership ownership,
Data data )
explicit

Constructs a new Stored Property instance.

Parameters
[in]interface_nameThe name of the interface the property belongs to.
[in]pathThe specific path of the property.
[in]version_majorThe major version of the interface.
[in]ownershipThe ownership of the interface.
[in]dataThe value payload of the property.

Member Function Documentation

◆ get_interface_name()

auto astarte::device::StoredProperty::get_interface_name ( ) const -> const std::string &
nodiscard

Retrieves the interface name.

Returns
A constant reference to the interface name string.

◆ get_ownership()

auto astarte::device::StoredProperty::get_ownership ( ) const -> const Ownership &
nodiscard

Retrieves the ownership of the interface.

Returns
A constant reference to the ownership enumeration.

◆ get_path()

auto astarte::device::StoredProperty::get_path ( ) const -> const std::string &
nodiscard

Retrieves the property path.

Returns
A constant reference to the path string.

◆ get_value()

auto astarte::device::StoredProperty::get_value ( ) const -> const Data &
nodiscard

Retrieves the value of the property.

Returns
A constant reference to the Data object containing the value.

◆ get_version_major()

auto astarte::device::StoredProperty::get_version_major ( ) const -> int32_t
nodiscard

Retrieves the major version of the interface.

Returns
The major version integer.

◆ operator!=()

auto astarte::device::StoredProperty::operator!= ( const StoredProperty & other) const -> bool
nodiscard

Inequality comparison operator.

Parameters
[in]otherThe StoredProperty object to compare with.
Returns
True if the properties are different, false otherwise.

◆ operator==()

auto astarte::device::StoredProperty::operator== ( const StoredProperty & other) const -> bool
nodiscard

Equality comparison operator.

Parameters
[in]otherThe StoredProperty object to compare with.
Returns
True if the properties are equal, false otherwise.

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