Index: mojo/edk/system/ports/name.cc |
diff --git a/mojo/edk/system/ports/name.cc b/mojo/edk/system/ports/name.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7088cbfd248e89c6ae51afd3f8292eb19e9fea18 |
--- /dev/null |
+++ b/mojo/edk/system/ports/name.cc |
@@ -0,0 +1,22 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "mojo/edk/system/ports/name.h" |
+ |
+namespace mojo { |
+namespace edk { |
+namespace ports { |
+ |
+std::ostream& operator<<(std::ostream& stream, const Name& name) { |
+ std::ios::fmtflags flags(stream.flags()); |
+ stream << std::hex << std::uppercase << name.v1; |
+ if (name.v2 != 0) |
+ stream << '.' << name.v2; |
+ stream.flags(flags); |
+ return stream; |
+} |
+ |
+} // namespace ports |
+} // namespace edk |
+} // namespace mojo |