ADTF
Loading...
Searching...
No Matches
adtf::base::ant::property_variable< T > Class Template Reference

Property Variable template for the given T. A Property Variable will store a copy of a property value of the specified type T. More...

#include <configuration.h>

Inherits adtf::base::ant::cPropertyVariable, and adtf::base::ant::property_value< T >.

Inherited by adtf::base::flash::property_variable< T >.

Public Member Functions

 property_variable ()
 CTOR.
 
 property_variable (const T &oValue)
 
void Notify (const IProperty &oProperty) override
 
tResult GetType (IString &&strType) const override
 
const IPropertyValueGetValue () const override
 
const T & operator* () const
 
 operator const T & () const
 
bool operator== (const T &oVal)
 
bool operator!= (const T &oVal)
 
- Public Member Functions inherited from adtf::base::ant::cPropertyVariable
void SetUnregister (IMemberPropertyUnregister &oUnregister)
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::base::ant::IPropertyObserver
 ~IPropertyObserver ()=default
 Protected destructor.
 

Detailed Description

template<typename T>
class adtf::base::ant::property_variable< T >

Property Variable template for the given T. A Property Variable will store a copy of a property value of the specified type T.

If it was registered to a property set adtf::base::ant::IProperties by IProperties::RegisterPropertyObserver the copy is automatically updated on property changes.

Parameters
TThe type of the property
Remarks
The notify call is not yet threadsafe!

Constructor & Destructor Documentation

◆ property_variable()

template<typename T>
adtf::base::ant::property_variable< T >::property_variable ( const T & oValue)
inline

type initializing CTOR

Parameters
oValue[in] initializes the property value immediately

Member Function Documentation

◆ GetType()

template<typename T>
tResult adtf::base::ant::property_variable< T >::GetType ( IString && strType) const
inlineoverridevirtual

Returns the identifier of the type.

Parameters
[out]strTypeThe type identifier.
Returns
Standard result.

Implements adtf::base::ant::cPropertyVariable.

◆ GetValue()

template<typename T>
const IPropertyValue * adtf::base::ant::property_variable< T >::GetValue ( ) const
inlineoverridevirtual
Returns
The inital value.

Implements adtf::base::ant::cPropertyVariable.

◆ Notify()

template<typename T>
void adtf::base::ant::property_variable< T >::Notify ( const IProperty & oProperty)
inlineoverridevirtual

Implements the observer pattern

Parameters
[in]oPropertyThe changed property.
Note
If oProperty is a subproperty, you will only receive the name of the subproperty without path or parent. Instead of implementing a adtf::base::ant::IPropertyObserver for each required property, you can also use adtf::base::hollow::property_variable::SetPropertyChangedCallback().

Implements adtf::base::ant::IPropertyObserver.


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