DBus::PropertyBase Class Reference

Base type of Property to allow for storage in e.g. More...

#include <property.h>

Inheritance diagram for DBus::PropertyBase:

Public Member Functions

std::string name () const
 Get the name of this propery. More...
 
Variant variant_value () const
 Get the value of this property as a Variant. More...
 
PropertyUpdateType update_type () const
 
PropertyAccess access_type () const
 
void set_value (Variant value)
 Set the value of this property. More...
 
virtual std::string introspect (int spaces)
 

Protected Member Functions

 PropertyBase (std::string name, PropertyAccess access, PropertyUpdateType update)
 
 ~PropertyBase ()
 

Private Member Functions

void setInterface (Interface *)
 
 DBUS_CXX_PROPAGATE_CONST (std::unique_ptr< priv_data >) m_priv
 

Friends

class Interface
 

Detailed Description

Base type of Property to allow for storage in e.g.

a vector.

Constructor & Destructor Documentation

◆ PropertyBase()

PropertyBase::PropertyBase ( std::string  name,
PropertyAccess  access,
PropertyUpdateType  update 
)
protected

◆ ~PropertyBase()

PropertyBase::~PropertyBase ( )
protected

Member Function Documentation

◆ access_type()

DBus::PropertyAccess PropertyBase::access_type ( ) const

◆ DBUS_CXX_PROPAGATE_CONST()

DBus::PropertyBase::DBUS_CXX_PROPAGATE_CONST ( std::unique_ptr< priv_data >  )
private

◆ introspect()

virtual std::string DBus::PropertyBase::introspect ( int  spaces)
inlinevirtual

Reimplemented in DBus::Property< T_type >.

◆ name()

std::string PropertyBase::name ( ) const

◆ set_value()

void PropertyBase::set_value ( DBus::Variant  value)

Set the value of this property.

When used on a remote property(a proxy), this will attempt to set the value on the remote object. If the property is READONLY, this acts as a No-op.

When used on a local property(adapter), this will emit the PropertyChanged DBus signal in order to notify clients that the property has updated. Note that the exact value of the PropertyUpdateType will determine what is emitted(invalidated, new value, or invalidation)

Parameters
valueThe new value to set

Referenced by DBus::Property< T_type >::set_value().

◆ setInterface()

void PropertyBase::setInterface ( Interface iface)
private

◆ update_type()

DBus::PropertyUpdateType PropertyBase::update_type ( ) const

◆ variant_value()

DBus::Variant PropertyBase::variant_value ( ) const

Get the value of this property as a Variant.

Returns

Referenced by DBus::Interface::property_updated(), and DBus::Property< T_type >::value().

Friends And Related Function Documentation

◆ Interface

friend class Interface
friend

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