ADTF
Loading...
Searching...
No Matches
properties_v1.h
Go to the documentation of this file.
1
7#pragma once
8#include "property.h"
9
12
13#include <string_view>
14
15namespace adtf
16{
17namespace base
18{
19namespace ant
20{
26 class cPropertiesBase : public ucom::catwo::object<IProperties>
27 {
29 A_UTILS_D(cPropertiesBase)
30 public:
47
48 private:
50 cPropertiesBase(cPropertiesBase&& oPropy) = delete;
52 cPropertiesBase& operator=(cPropertiesBase&& oPropy) = delete;
53
54 public: //implement IProperties
55 bool Exists(const char* strName) const override;
56 tResult Get(IProperties& pProperties) const override;
57 tResult Set(const IProperties& pProperties) override;
58
59 size_t GetSize() const override;
60
61 tResult GetProperty(const char* strName, IProperty& pProperty) const override;
62 tResult SetProperty(const IProperty& pProperty) override;
63 tResult SetPropertyByPath(const char* strParentPath, const IProperty& pProperty) override;
64
65 tResult RemoveProperty(const char* strName) override;
66
67 public: //Simple Access
73 bool IsEqual(const IProperties& oProperties) const;
74
75 public:
76 tResult RegisterPropertyObserver(const char* strPropertyName, IPropertyObserver& oObserver);
77 tResult UnregisterPropertyObserver(IPropertyObserver& oObserver);
78
79 public:
88 cPropertiesBase& CreateProperty(const char* strName, const ant::IPropertyValue& oValue);
89 };
90
95 {
96 public:
100 virtual ~cProperties();
103 cProperties(const cProperties& oPropy);
109 cProperties(const IProperties& oIPropy);
113
114 private:
116 cProperties(cProperties&& oPropy) = delete;
118 cProperties& operator=(cProperties&& oPropy) = delete;
119 };
120
125 public ucom::catwo::object<IProperties>
126 {
127 public:
128 bool Exists(const char* /* strName */) const override
129 {
130 return false;
131 }
132
133 tResult GetProperty(const char* /* strName */, IProperty& /* oProperty */) const override
134 {
135 RETURN_ERROR(ERR_NOT_IMPL);
136 }
137
138 //this needs to overwrite
139 tResult SetProperty(const IProperty& /* oProperty */) = 0;
140
141 tResult SetPropertyByPath(const char* /* strParentPath */, const IProperty& /* pProperty */) override
142 {
143 RETURN_ERROR(ERR_NOT_IMPL);
144 }
145
146 tResult Set(const IProperties& /* oProperties */ ) override
147 {
148 RETURN_ERROR(ERR_NOT_IMPL);
149 }
150
151 tResult Get(IProperties& /* oProperties */ ) const override
152 {
153 RETURN_ERROR(ERR_NOT_IMPL);
154 }
155
156 size_t GetSize() const override
157 {
158 return 0;
159 }
160
161 tResult RemoveProperty(const char* /* strName */ ) override
162 {
163 RETURN_ERROR(ERR_NOT_IMPL);
164 }
165
166 tResult RegisterPropertyObserver(const char* /* strPropertyName */,
167 IPropertyObserver& /* oObserver */) override
168 {
169 RETURN_ERROR(ERR_NOT_IMPL);
170 }
171
172 tResult UnregisterPropertyObserver(IPropertyObserver& /* oObserver */) override
173 {
174 RETURN_ERROR(ERR_NOT_IMPL);
175 }
176 };
177
178
179} //namespace ant
180
182
183} // namespace base
184} // namespace adtf
185
186#include "properties_v2.h"
187#include "property_helper.h"
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
Definition result.h:42
Definition property_intf.h:213
Definition property_intf.h:190
Definition property_intf.h:61
Definition property_intf.h:119
cPropertiesBase & CreateProperty(const char *strName, const ant::IPropertyValue &oValue)
cPropertiesBase(const cPropertiesBase &oPropy)
cPropertiesBase & operator=(const IProperties &oIPropy)
cPropertiesBase(const IProperties &oIPropy)
cPropertiesBase & operator=(const cPropertiesBase &oPropy)
bool IsEqual(const IProperties &oProperties) const
Definition properties_v1.h:126
cProperties(const cProperties &oPropy)
cProperties(const IProperties &oIPropy)
cProperties & operator=(const cProperties &oPropy)
cProperties & operator=(const IProperties &oIPropy)
Definition object.h:397
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