blob: 8606b6bbca1962b884eefdc077ebd1ef73f4fb35 [file] [log] [blame]
keybuk@google.combf4649a2012-02-15 06:29:06 +09001// 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
pneubeck@chromium.orgd8ba24c2013-04-12 23:16:32 +09007#include <ostream>
8
hashimoto@chromium.org5fdbcf72012-06-05 13:15:50 +09009#include "dbus/string_util.h"
10
keybuk@google.combf4649a2012-02-15 06:29:06 +090011namespace dbus {
12
hashimoto@chromium.org5fdbcf72012-06-05 13:15:50 +090013bool ObjectPath::IsValid() const {
14 return IsValidObjectPath(value_);
15}
16
keybuk@google.combf4649a2012-02-15 06:29:06 +090017bool 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
pneubeck@chromium.orgd8ba24c2013-04-12 23:16:32 +090029void PrintTo(const ObjectPath& path, std::ostream* out) {
30 *out << path.value();
31}
32
keybuk@google.combf4649a2012-02-15 06:29:06 +090033} // namespace dbus