1 // Copyright 2016 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 "mojo/core/ports/name.h" 6 7 namespace mojo { 8 namespace core { 9 namespace ports { 10 11 const PortName kInvalidPortName = {0, 0}; 12 13 const NodeName kInvalidNodeName = {0, 0}; 14 operator <<(std::ostream & stream,const Name & name)15std::ostream& operator<<(std::ostream& stream, const Name& name) { 16 std::ios::fmtflags flags(stream.flags()); 17 stream << std::hex << std::uppercase << name.v1; 18 if (name.v2 != 0) 19 stream << '.' << name.v2; 20 stream.flags(flags); 21 return stream; 22 } 23 24 } // namespace ports 25 } // namespace core 26 } // namespace mojo 27