object_path.cc 732 B

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