Lines Matching defs:Handle

21 // |Handle| and |...Handle|:
23 // |Handle| is a simple, copyable wrapper for the C type |MojoHandle| (which is
26 // |Handle|, e.g., |MessagePipeHandle| and |DataPipeProducerHandle|. |Handle|
30 // Note that though we provide constructors for |Handle|/|...Handle| from a
32 // from a |Handle|. This is for type safety: If we did, you'd then be able to
34 // it's a |Handle|).
36 // |ScopedHandleBase| and |Scoped...Handle|:
45 // |ScopedHandle| is just (a typedef of) a |ScopedHandleBase<Handle>|.
57 // should take (or produce) an appropriate |Scoped...Handle|, while those that
58 // don't take a |...Handle|. For example, |CreateMessagePipe()| has two
60 // |Handle| parameters. Some, have both: e.g., |DuplicatedBuffer()| takes a
66 // |Handle|, leaving the user to discard the wrapper.
143 // Handle ----------------------------------------------------------------------
148 class Handle {
150 Handle() : value_(kInvalidHandleValue) {}
151 explicit Handle(MojoHandle value) : value_(value) {}
152 ~Handle() {}
154 void swap(Handle& other) {
180 static_assert(sizeof(Handle) == sizeof(MojoHandle), "Bad size for C++ Handle");
183 typedef ScopedHandleBase<Handle> ScopedHandle;
184 static_assert(sizeof(ScopedHandle) == sizeof(Handle),
187 inline MojoResult Wait(Handle handle,
223 // |std::vector<Handle>| and |std::vector<MojoHandleSignals>|, respectively:
246 const Handle& first_handle = handles[0];
276 const Handle& first_handle = handles[0];
292 inline MojoResult CloseRaw(Handle handle) {
296 // Strict weak ordering, so that |Handle|s can be used as keys in |std::map|s,
297 inline bool operator<(const Handle a, const Handle b) {
301 // Comparison, so that |Handle|s can be used as keys in hash maps.
302 inline bool operator==(const Handle a, const Handle b) {