| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ |
| 6 #define MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ | 6 #define MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ |
| 7 | 7 |
| 8 #include <assert.h> | 8 #include <assert.h> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| 11 #include "mojo/public/c/system/functions.h" | |
| 12 #include "mojo/public/c/system/handle.h" | 11 #include "mojo/public/c/system/handle.h" |
| 13 #include "mojo/public/c/system/result.h" | 12 #include "mojo/public/c/system/result.h" |
| 14 #include "mojo/public/c/system/types.h" | 13 #include "mojo/public/c/system/time.h" |
| 14 #include "mojo/public/c/system/wait.h" |
| 15 #include "mojo/public/cpp/system/macros.h" | 15 #include "mojo/public/cpp/system/macros.h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 | 18 |
| 19 // OVERVIEW | 19 // OVERVIEW |
| 20 // | 20 // |
| 21 // |Handle| and |...Handle|: | 21 // |Handle| and |...Handle|: |
| 22 // | 22 // |
| 23 // |Handle| is a simple, copyable wrapper for the C type |MojoHandle| (which is | 23 // |Handle| is a simple, copyable wrapper for the C type |MojoHandle| (which is |
| 24 // just an integer). Its purpose is to increase type-safety, not provide | 24 // just an integer). Its purpose is to increase type-safety, not provide |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 | 284 |
| 285 // Strict weak ordering, so that |Handle|s can be used as keys in |std::map|s, | 285 // Strict weak ordering, so that |Handle|s can be used as keys in |std::map|s, |
| 286 inline bool operator<(const Handle a, const Handle b) { | 286 inline bool operator<(const Handle a, const Handle b) { |
| 287 return a.value() < b.value(); | 287 return a.value() < b.value(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace mojo | 290 } // namespace mojo |
| 291 | 291 |
| 292 #endif // MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ | 292 #endif // MOJO_PUBLIC_CPP_SYSTEM_HANDLE_H_ |
| OLD | NEW |