elect
07/11/2018, 9:44 AMlouiscad
07/11/2018, 9:47 AMelect
07/11/2018, 9:48 AMhas
, hasnt
, or
, and
, wo
(without)elect
07/11/2018, 9:49 AMenum
, https://github.com/kotlin-graphics/imgui/blob/master/src/main/kotlin/imgui/enums.kt#L79-L82elect
07/11/2018, 9:49 AMelect
07/11/2018, 9:50 AMelect
07/11/2018, 9:50 AMgildor
07/11/2018, 9:51 AMelect
07/11/2018, 9:51 AMEnumSet
possibility, but that's not an option for me. Too many code border, instantiations and style difference from original C portelect
07/11/2018, 9:52 AMgildor
07/11/2018, 9:52 AMgildor
07/11/2018, 9:55 AMelect
07/11/2018, 9:58 AMelect
07/11/2018, 9:59 AMenum class WindowFlag
and typealias WindowFlags = Int
to help understanding on which enum set an int mask is based fromelect
07/11/2018, 10:03 AMEnumSet
, didn't you?gildor
07/11/2018, 10:03 AMgildor
07/11/2018, 10:03 AMelect
07/11/2018, 10:04 AMgildor
07/11/2018, 10:04 AMgildor
07/11/2018, 10:05 AMelect
07/11/2018, 10:05 AMEnumSet
instantiations and style difference compare to the C codeelect
07/11/2018, 10:05 AMelect
07/11/2018, 10:06 AMgildor
07/11/2018, 10:06 AMwindow.flags += ShowBorders
is worse than
window.flags |= ShowBorders.i
gildor
07/11/2018, 10:07 AMwherever I need thatEnum already has
ordinal
property which is int representation of enumelect
07/11/2018, 10:11 AMelect
07/11/2018, 10:12 AMordinal
only when the corresponding enum is supposed to start from 0 and increase contiguously. Unfortunately this is not always the caseelect
07/11/2018, 10:12 AM.i
field for thatgildor
07/11/2018, 10:12 AMelect
07/11/2018, 10:12 AMelect
07/11/2018, 10:13 AMgildor
07/11/2018, 10:13 AMelect
07/11/2018, 10:13 AMelect
07/11/2018, 10:13 AMgildor
07/11/2018, 10:14 AMgildor
07/11/2018, 10:17 AMEnum sets are represented internally as bit vectors. This representation is extremely compact and efficient. The space and time performance of this class should be good enough to allow its use as a high-quality, typesafe alternative to traditional int-based “bit flags.” Even bulk operations (such as containsAll and retainAll) should run very quickly if their argument is also an enum set.
gildor
07/11/2018, 10:19 AMgildor
07/11/2018, 10:20 AMelect
07/11/2018, 10:20 AMelect
07/11/2018, 10:31 AMEnumSet
is that on C, when you pass flag
you pass a copy, on JVM I'd pass the reference to the class. That was another big error prone pointelect
07/11/2018, 10:31 AMgildor
07/11/2018, 10:35 AMelect
07/16/2018, 9:44 AMelect
07/16/2018, 9:45 AMgildor
07/16/2018, 12:45 PM