Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: mojo/edk/system/ports/name.h

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef MOJO_EDK_SYSTEM_PORTS_NAME_H_
6 #define MOJO_EDK_SYSTEM_PORTS_NAME_H_
7
8 #include <stdint.h>
9
10 #include <ostream>
11
12 namespace mojo {
13 namespace edk {
14 namespace ports {
15
16 struct Name {
17 Name(uint64_t v1, uint64_t v2) : v1(v1), v2(v2) {}
18 uint64_t v1, v2;
19 };
20
21 inline bool operator==(const Name& a, const Name& b) {
22 return a.v1 == b.v1 && a.v2 == b.v2;
23 }
24 inline bool operator!=(const Name& a, const Name& b) {
25 return !(a == b);
26 }
27 std::ostream& operator<<(std::ostream& stream, const Name& name);
28
29 struct PortName : Name {
30 PortName() : Name(0, 0) {}
31 PortName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
32 };
33
34 const PortName kInvalidPortName = {0, 0};
35
36 struct NodeName : Name {
37 NodeName() : Name(0, 0) {}
38 NodeName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
39 };
40
41 const NodeName kInvalidNodeName = {0, 0};
42
43 } // namespace ports
44 } // namespace edk
45 } // namespace mojo
46
47 #endif // MOJO_EDK_SYSTEM_PORTS_NAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698