blob: e0c3219f1762389e4dc5604b2241e527e17892fe [file] [log] [blame]
Avi Drissmanf75e37f2022-09-13 19:40:311// Copyright 2012 The Chromium Authors
[email protected]216ed0b2012-02-14 21:29:062// 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
[email protected]ae0cda22013-04-12 14:16:327#include <ostream>
8
[email protected]43fa5b82012-06-05 04:15:509#include "dbus/string_util.h"
10
[email protected]216ed0b2012-02-14 21:29:0611namespace dbus {
12
[email protected]43fa5b82012-06-05 04:15:5013bool ObjectPath::IsValid() const {
14 return IsValidObjectPath(value_);
15}
16
[email protected]216ed0b2012-02-14 21:29:0617bool ObjectPath::operator<(const ObjectPath& that) const {
18 return value_ < that.value_;
19}
20
21bool ObjectPath::operator==(const ObjectPath& that) const {
22 return value_ == that.value_;
23}
24
25bool ObjectPath::operator!=(const ObjectPath& that) const {
26 return value_ != that.value_;
27}
28
[email protected]ae0cda22013-04-12 14:16:3229void PrintTo(const ObjectPath& path, std::ostream* out) {
30 *out << path.value();
31}
32
[email protected]216ed0b2012-02-14 21:29:0633} // namespace dbus