OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DBUS_PROPERTY_H_ | 5 #ifndef DBUS_PROPERTY_H_ |
6 #define DBUS_PROPERTY_H_ | 6 #define DBUS_PROPERTY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // no knowledge of the contained type is required. | 164 // no knowledge of the contained type is required. |
165 // Implementation provided by specialization. | 165 // Implementation provided by specialization. |
166 virtual void AppendSetValueToWriter(MessageWriter* writer) = 0; | 166 virtual void AppendSetValueToWriter(MessageWriter* writer) = 0; |
167 | 167 |
168 // Method used by test and stub implementations of dbus::PropertySet::Set | 168 // Method used by test and stub implementations of dbus::PropertySet::Set |
169 // to replace the property value with the set value without using a | 169 // to replace the property value with the set value without using a |
170 // dbus::MessageReader. | 170 // dbus::MessageReader. |
171 virtual void ReplaceValueWithSetValue() = 0; | 171 virtual void ReplaceValueWithSetValue() = 0; |
172 | 172 |
173 protected: | 173 protected: |
| 174 virtual ~PropertyBase() { } |
| 175 |
174 // Retrieves the associated property set. | 176 // Retrieves the associated property set. |
175 PropertySet* property_set() { return property_set_; } | 177 PropertySet* property_set() { return property_set_; } |
176 | 178 |
177 private: | 179 private: |
178 // Pointer to the PropertySet instance that this instance is a member of, | 180 // Pointer to the PropertySet instance that this instance is a member of, |
179 // no ownership is taken and |property_set_| must outlive this class. | 181 // no ownership is taken and |property_set_| must outlive this class. |
180 PropertySet* property_set_; | 182 PropertySet* property_set_; |
181 | 183 |
182 // Name of the property. | 184 // Name of the property. |
183 std::string name_; | 185 std::string name_; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 MessageWriter* writer); | 458 MessageWriter* writer); |
457 | 459 |
458 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( | 460 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( |
459 MessageReader* reader); | 461 MessageReader* reader); |
460 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( | 462 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( |
461 MessageWriter* writer); | 463 MessageWriter* writer); |
462 | 464 |
463 } // namespace dbus | 465 } // namespace dbus |
464 | 466 |
465 #endif // DBUS_PROPERTY_H_ | 467 #endif // DBUS_PROPERTY_H_ |
OLD | NEW |