Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Side by Side Diff: dbus/object_path.cc

Issue 9378039: dbus: add ObjectPath type (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: added inequality operator Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "dbus/object_path.h"
6
7 #include <ostream>
8 #include <string>
9
10 namespace dbus {
11
12 bool operator<(const ObjectPath& lhs, const ObjectPath& rhs) {
13 return lhs.value() < rhs.value();
14 }
15
16 bool operator==(const ObjectPath& lhs, const ObjectPath& rhs) {
17 return lhs.value() == rhs.value();
18 }
19
20 bool operator!=(const ObjectPath& lhs, const ObjectPath& rhs) {
21 return lhs.value() != rhs.value();
22 }
23
24 std::ostream& operator<<(std::ostream& os, const ObjectPath& object_path) {
25 os << object_path.value();
26 return os;
27 }
28
29 } // namespace dbus
OLDNEW
« dbus/object_path.h ('K') | « dbus/object_path.h ('k') | dbus/object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698