-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from bemanproject/abstract-event_type
abstracted the completion events into an enum class
- Loading branch information
Showing
7 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// include/beman/net/detail/event_type.hpp -*-C++-*- | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#ifndef INCLUDED_INCLUDE_BEMAN_NET_DETAIL_EVENT_TYPE | ||
#define INCLUDED_INCLUDE_BEMAN_NET_DETAIL_EVENT_TYPE | ||
|
||
#include <cinttypes> | ||
|
||
// ---------------------------------------------------------------------------- | ||
|
||
namespace beman::net { | ||
enum class event_type { none = 0x00, in = 0x01, out = 0x02, in_out = 0x03 }; | ||
constexpr ::beman::net::event_type operator&(::beman::net::event_type e0, ::beman::net::event_type e1) { | ||
return ::beman::net::event_type(::std::uint8_t(e0) & ::std::uint8_t(e1)); | ||
} | ||
} // namespace beman::net | ||
// ---------------------------------------------------------------------------- | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters