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 #include "dbus/object_path.h" | 5 #include "dbus/object_path.h" |
6 | 6 |
| 7 #include <ostream> |
| 8 |
7 #include "dbus/string_util.h" | 9 #include "dbus/string_util.h" |
8 | 10 |
9 namespace dbus { | 11 namespace dbus { |
10 | 12 |
11 bool ObjectPath::IsValid() const { | 13 bool ObjectPath::IsValid() const { |
12 return IsValidObjectPath(value_); | 14 return IsValidObjectPath(value_); |
13 } | 15 } |
14 | 16 |
15 bool ObjectPath::operator<(const ObjectPath& that) const { | 17 bool ObjectPath::operator<(const ObjectPath& that) const { |
16 return value_ < that.value_; | 18 return value_ < that.value_; |
17 } | 19 } |
18 | 20 |
19 bool ObjectPath::operator==(const ObjectPath& that) const { | 21 bool ObjectPath::operator==(const ObjectPath& that) const { |
20 return value_ == that.value_; | 22 return value_ == that.value_; |
21 } | 23 } |
22 | 24 |
23 bool ObjectPath::operator!=(const ObjectPath& that) const { | 25 bool ObjectPath::operator!=(const ObjectPath& that) const { |
24 return value_ != that.value_; | 26 return value_ != that.value_; |
25 } | 27 } |
26 | 28 |
| 29 void PrintTo(const ObjectPath& path, std::ostream* out) { |
| 30 *out << path.value(); |
| 31 } |
| 32 |
27 } // namespace dbus | 33 } // namespace dbus |
OLD | NEW |