[ntcore] Change Java event mask to EnumSet (#4564)

Also convert NetworkTableInstance.getNetworkMode() to return EnumSet.
This commit is contained in:
Peter Johnson
2022-11-04 20:25:37 -07:00
committed by GitHub
parent fa44a07938
commit 5005e2ca04
12 changed files with 216 additions and 115 deletions

View File

@@ -223,6 +223,14 @@ class Event {
*/
unsigned int flags{0};
/**
* Test event flags.
*
* @param kind event flag(s) to test
* @return True if flags matches kind
*/
bool Is(unsigned int kind) const { return (flags & kind) != 0; }
/** Event data; content depends on flags. */
std::variant<ConnectionInfo, TopicInfo, ValueEventData, LogMessage> data;