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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 class PropertySet; | 127 class PropertySet; |
128 | 128 |
129 // PropertyBase is an abstract base-class consisting of the parts of | 129 // PropertyBase is an abstract base-class consisting of the parts of |
130 // the Property<> template that are not type-specific, such as the | 130 // the Property<> template that are not type-specific, such as the |
131 // associated PropertySet, property name, and the type-unsafe parts | 131 // associated PropertySet, property name, and the type-unsafe parts |
132 // used by PropertySet. | 132 // used by PropertySet. |
133 class PropertyBase { | 133 class PropertyBase { |
134 public: | 134 public: |
135 PropertyBase() : property_set_(NULL) {} | 135 PropertyBase() : property_set_(NULL) {} |
| 136 virtual ~PropertyBase() {} |
136 | 137 |
137 // Initializes the |property_set| and property |name| so that method | 138 // Initializes the |property_set| and property |name| so that method |
138 // calls may be made from this class. This method is called by | 139 // calls may be made from this class. This method is called by |
139 // PropertySet::RegisterProperty() passing |this| for |property_set| so | 140 // PropertySet::RegisterProperty() passing |this| for |property_set| so |
140 // there should be no need to call it directly. If you do beware that | 141 // there should be no need to call it directly. If you do beware that |
141 // no ownership or reference to |property_set| is taken so that object | 142 // no ownership or reference to |property_set| is taken so that object |
142 // must outlive this one. | 143 // must outlive this one. |
143 void Init(PropertySet* property_set, const std::string& name); | 144 void Init(PropertySet* property_set, const std::string& name); |
144 | 145 |
145 // Retrieves the name of this property, this may be useful in observers | 146 // Retrieves the name of this property, this may be useful in observers |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 MessageWriter* writer); | 457 MessageWriter* writer); |
457 | 458 |
458 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( | 459 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( |
459 MessageReader* reader); | 460 MessageReader* reader); |
460 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( | 461 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( |
461 MessageWriter* writer); | 462 MessageWriter* writer); |
462 | 463 |
463 } // namespace dbus | 464 } // namespace dbus |
464 | 465 |
465 #endif // DBUS_PROPERTY_H_ | 466 #endif // DBUS_PROPERTY_H_ |
OLD | NEW |