ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
property< T >

Property property implementation template. More...

#include <property.h>

Inheritance diagram for property< T >:
[legend]

Public Member Functions

 property ()
 CTOR.
 
 ~property ()=default
 DTOR.
 
 property (const property &oProperty)
 Copy CTOR.
 
 property (property &&oProperty)
 implementation of the move CTOR (but it is not moving yet)
 
propertyoperator= (const property &oValue)
 copy assignment
 
propertyoperator= (property &&oProperty)
 move assignment (its not moving yet)
 
 property (const adtf_util::cString &strName, const T &oValue)
 CTOR with name an value.
 
 property (std_string_helper, std::string_view strName)
 CTOR with name an value.
 
 property (const T &oValue)
 CTOR with value.
 
const propertyoperator= (const T &oValue)
 value assignment
 
bool operator== (const property &oProperty) const
 compare operator
 
bool operator== (const T &oValue) const
 compare operator
 
GetValueT () const
 Get the containing value.
 
tResult Set (const property &oProperty)
 Sets the property value and name as COPY of oProperty.
 
virtual const IPropertyValueGetValue () const
 
virtual IPropertyValueGetValue ()
 
virtual tResult SetValue (const IPropertyValue &oValue)
 
tResult Set (const IProperty &oProp)
 
- Public Member Functions inherited from cPropertyBase
tResult GetName (IString &&strName) const override
 
bool HasProperties () const override
 
bool HasAttachedProperties () const override
 
tResult SetProperties (const IProperties &oProperties) override
 will copy given properties
 
tResult AttachProperties (const ucom::ant::iobject_ptr< IProperties > &pAttachedProperties) override
 will set given properties to be attached
 
tResult GetAttachedProperties (IProperty &oProperty) const override
 
tResult DetachProperties () override
 
tResult GetProperties (ucom::ant::iobject_ptr< IProperties > &pSubProperties) override
 get subproperties for writing access
 
tResult GetProperties (ucom::ant::iobject_ptr< const IProperties > &pSubProperties) const override
 get subproperties for readonly access
 
tResult SetName (const IString &strName) override
 

Private Attributes

property_value< T > m_oValue
 value type container
 

Additional Inherited Members

- Protected Attributes inherited from cPropertyBase
util::cString m_strName
 
ucom::object_ptr< IPropertiesm_poSubProperties = nullptr
 
ucom::object_ptr< IPropertiesm_poAttachedProperties = nullptr
 

Detailed Description

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

Property property implementation template.

Use this template to create an instance of an property with for the given value type T.

Template Parameters
TRaw Value type for the property.

Definition at line 211 of file property.h.

Constructor & Destructor Documentation

◆ property() [1/6]

template<typename T>
property ( )
inline

CTOR.

Definition at line 219 of file property.h.

◆ property() [2/6]

template<typename T>
property ( const property< T > & oProperty)
inline

Copy CTOR.

Definition at line 226 of file property.h.

◆ property() [3/6]

template<typename T>
property ( property< T > && oProperty)
inline

implementation of the move CTOR (but it is not moving yet)

Definition at line 231 of file property.h.

◆ property() [4/6]

template<typename T>
property ( const adtf_util::cString & strName,
const T & oValue )
inline

CTOR with name an value.

Parameters
strName[in] Name of the property
oValue[in] Value of the property

Definition at line 264 of file property.h.

◆ property() [5/6]

template<typename T>
property ( std_string_helper ,
std::string_view strName )
inline

CTOR with name an value.

Parameters
strName[in] Name of the property
oValue[in] Value of the property

Definition at line 275 of file property.h.

◆ property() [6/6]

template<typename T>
property ( const T & oValue)
inline

CTOR with value.

Parameters
oValue[in] Value of the property

Definition at line 284 of file property.h.

Member Function Documentation

◆ GetValue() [1/2]

template<typename T>
virtual IPropertyValue * GetValue ( )
inlinevirtual

Implements IProperty.

Definition at line 361 of file property.h.

◆ GetValue() [2/2]

template<typename T>
virtual const IPropertyValue * GetValue ( ) const
inlinevirtual

Implements IProperty.

Definition at line 357 of file property.h.

◆ GetValueT()

template<typename T>
T GetValueT ( ) const
inline

Get the containing value.

Returns
The Value content of as T

Definition at line 324 of file property.h.

Referenced by property<::adtf::base::ant::property_attached_configuration_type >::operator==().

◆ operator=() [1/3]

template<typename T>
property & operator= ( const property< T > & oValue)
inline

copy assignment

Definition at line 241 of file property.h.

◆ operator=() [2/3]

template<typename T>
const property & operator= ( const T & oValue)
inline

value assignment

Parameters
oValue[in] Value of the property

Definition at line 292 of file property.h.

◆ operator=() [3/3]

template<typename T>
property & operator= ( property< T > && oProperty)
inline

move assignment (its not moving yet)

Definition at line 248 of file property.h.

◆ operator==() [1/2]

template<typename T>
bool operator== ( const property< T > & oProperty) const
inline

compare operator

Parameters
oProperty[in] property to compare to
Return values
trueThe value (only the value!) is equal.
falseThe value (only the value!) is not equal.

Definition at line 304 of file property.h.

◆ operator==() [2/2]

template<typename T>
bool operator== ( const T & oValue) const
inline

compare operator

Parameters
oValue[in] value to compare to
Return values
trueThe value (only the value!) is equal.
falseThe value (only the value!) is not equal.

Definition at line 315 of file property.h.

◆ Set() [1/2]

template<typename T>
tResult Set ( const IProperty & oProp)
inlinevirtual

Implements IProperty.

Definition at line 382 of file property.h.

◆ Set() [2/2]

template<typename T>
tResult Set ( const property< T > & oProperty)
inline

Sets the property value and name as COPY of oProperty.

Also every Subproperty is copied. If the oProperty has attached properties they will be referenced.

Returns
Standard Result Code

Definition at line 336 of file property.h.

Referenced by property<::adtf::base::ant::property_attached_configuration_type >::property(), and property<::adtf::base::ant::property_attached_configuration_type >::operator=().

◆ SetValue()

template<typename T>
virtual tResult SetValue ( const IPropertyValue & oValue)
inlinevirtual

Implements IProperty.

Definition at line 366 of file property.h.

Member Data Documentation

◆ m_oValue

template<typename T>
property_value<T> m_oValue
private

value type container

Definition at line 215 of file property.h.

Referenced by property<::adtf::base::ant::property_attached_configuration_type >::Set().