30 property_value(): m_oValue()
33 property_value(
const property_value& oValue): property_value()
35 m_oValue = oValue.m_oValue;
37 property_value(property_value&& oValue): property_value()
39 m_oValue = oValue.m_oValue;
41 property_value& operator=(
const property_value& oValue)
43 m_oValue = oValue.m_oValue;
46 property_value& operator=(property_value&& oValue)
48 m_oValue = oValue.m_oValue;
51 virtual ~property_value()
54 property_value(
const T& oValue): property_value()
62 const property_value& operator=(
const T& oValue)
67 bool operator==(
const T& oValue)
const
69 return (m_oValue == oValue);
71 bool operator==(
const property_value& oValue)
const
73 return (m_oValue == oValue.GetValue());
75 const T& GetValue()
const
82 std::string strTypeOfValue;
83 std::string strTypeOfMe;
86 bool bTryStringConversion =
false;
89 if (strTypeOfValue == strTypeOfMe)
101 RETURN_IF_FAILED(
FromRaw(oMem));
105 bTryStringConversion =
true;
113 bTryStringConversion =
true;
120 bTryStringConversion =
true;
127 if (bTryStringConversion)
161 adtf_util::cString strValue;
163 RETURN_IF_FAILED(oStringValue.Set(strValue.GetPtr()));
168 adtf_util::cString strValue = oStringValue.
Get();
179 util::cString m_strName;
185 virtual ~cPropertyBase()
override;
190 bool HasProperties()
const override;
191 bool HasAttachedProperties()
const override;
242 m_oValue = oProperty.m_oValue;
243 m_strName = oProperty.m_strName;
244 m_poSubProperties = oProperty.m_poSubProperties;
245 oProperty.m_poSubProperties =
nullptr;
246 m_poAttachedProperties = oProperty.m_poAttachedProperties;
247 oProperty.m_poAttachedProperties =
nullptr;
259 m_oValue = oProperty.m_oValue;
260 m_strName = oProperty.m_strName;
261 m_poSubProperties = oProperty.m_poSubProperties;
262 oProperty.m_poSubProperties =
nullptr;
263 m_poAttachedProperties = oProperty.m_poAttachedProperties;
264 oProperty.m_poAttachedProperties =
nullptr;
273 property(
const adtf_util::cString& strName,
const T& oValue)
286 m_strName.Set(strName.data(), strName.size());
315 return (m_oValue.operator==(oProperty.
GetValueT()));
326 return (m_oValue == oValue);
335 return m_oValue.GetValue();
347 m_oValue = oProperty.m_oValue;
348 m_strName = oProperty.m_strName;
354 if (oProperty.HasAttachedProperties())
360 m_poSubProperties->Set(*pSubProperties.Get());
375 virtual tResult SetValue(
const IPropertyValue& oValue)
377 return m_oValue.
Set(oValue);
381 #pragma warning(push)
382 #pragma warning(disable : 4996)
383#elif defined(__clang__)
384 #pragma clang diagnostic push
385 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
387 #pragma GCC diagnostic push
388 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
397 if (oProp.HasProperties())
401 if (oProp.HasAttachedProperties())
403 oProp.GetAttachedProperties(*
this);
407 adtf::ucom::object_ptr<const IProperties> pSubProperties;
408 oProp.GetProperties(pSubProperties);
418#elif defined(__clang__)
419 #pragma clang diagnostic pop
421 #pragma GCC diagnostic pop
#define IS_FAILED(s)
Check if result is failed.
Definition result.h:20
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
Definition result.h:42
#define IS_OK(s)
Check if result is OK.
Definition result.h:17
#define RETURN_IF_FAILED_DESC(s,...)
Definition result.h:168
Definition property_intf.h:213
Definition property_intf.h:61
virtual tResult ToString(IString &&strIToString) const =0
virtual tResult GetType(IString &&strType) const =0
Definition property_intf.h:119
Definition rawmemory_base.h:23
virtual size_t GetSize() const =0
virtual tResult ToRaw(IRawMemory &&oRawValue) const =0
Definition string_intf.h:29
virtual const char * Get() const =0
tResult DetachProperties() override
tResult GetAttachedProperties(IProperty &oProperty) const 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 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 ToString(IString &&oStringValue) const
Definition property.h:159
tResult FromRaw(const IRawMemory &oFromMem)
Definition property.h:154
tResult GetType(IString &&strType) const
Definition property.h:145
tResult ToRaw(IRawMemory &&oToMem) const
Definition property.h:150
tResult FromString(const IString &oStringValue)
Definition property.h:166
tResult Set(const IPropertyValue &oValue)
Definition property.h:80
const property & operator=(const T &oValue)
Definition property.h:301
bool operator==(const T &oValue) const
Definition property.h:324
property()
CTOR.
Definition property.h:228
T GetValueT() const
Definition property.h:333
property & operator=(property &&oProperty)
move assignment (its not moving yet)
Definition property.h:257
tResult Set(const property &oProperty)
Definition property.h:345
property(property &&oProperty)
implementation of the move CTOR (but it is not moving yet)
Definition property.h:240
property(const adtf_util::cString &strName, const T &oValue)
Definition property.h:273
property(const T &oValue)
Definition property.h:293
property & operator=(const property &oValue)
copy assignment
Definition property.h:250
property(const property &oProperty)
Copy CTOR.
Definition property.h:235
bool operator==(const property &oProperty) const
Definition property.h:313
property(std_string_helper, std::string_view strName)
Definition property.h:284
Definition rawmemory_intf.h:306
Definition string_intf.h:398
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
Definition adtf_class_version.h:16
Namespace for the ADTF Base SDK.
Definition adtf_base_type_traits.h:13
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
#define adtf_string_intf(__string__)
Definition string_intf.h:465
Definition property_type_definitions.h:38
Definition property.h:211
Definition property_type_definitions.h:211