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() {} | |
137 | 136 |
138 // Initializes the |property_set| and property |name| so that method | 137 // Initializes the |property_set| and property |name| so that method |
139 // calls may be made from this class. This method is called by | 138 // calls may be made from this class. This method is called by |
140 // PropertySet::RegisterProperty() passing |this| for |property_set| so | 139 // PropertySet::RegisterProperty() passing |this| for |property_set| so |
141 // there should be no need to call it directly. If you do beware that | 140 // there should be no need to call it directly. If you do beware that |
142 // no ownership or reference to |property_set| is taken so that object | 141 // no ownership or reference to |property_set| is taken so that object |
143 // must outlive this one. | 142 // must outlive this one. |
144 void Init(PropertySet* property_set, const std::string& name); | 143 void Init(PropertySet* property_set, const std::string& name); |
145 | 144 |
146 // Retrieves the name of this property, this may be useful in observers | 145 // 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... |
457 MessageWriter* writer); | 456 MessageWriter* writer); |
458 | 457 |
459 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( | 458 template <> bool Property<std::vector<ObjectPath> >::PopValueFromReader( |
460 MessageReader* reader); | 459 MessageReader* reader); |
461 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( | 460 template <> void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( |
462 MessageWriter* writer); | 461 MessageWriter* writer); |
463 | 462 |
464 } // namespace dbus | 463 } // namespace dbus |
465 | 464 |
466 #endif // DBUS_PROPERTY_H_ | 465 #endif // DBUS_PROPERTY_H_ |
OLD | NEW |