mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
support for scoped enums and operators in Python
This commit is contained in:
@ -395,7 +395,7 @@ typedef struct {
|
||||
enum timingSourceType { TIMING_INTERNAL, TIMING_EXTERNAL };
|
||||
|
||||
#ifdef __cplusplus
|
||||
enum class EthernetInterface : int32_t {
|
||||
enum class EthernetInterface {
|
||||
#else
|
||||
enum EthernetInterface {
|
||||
#endif
|
||||
@ -497,15 +497,15 @@ typedef struct {
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
inline slsDetectorDefs::EthernetInterface
|
||||
operator|(const slsDetectorDefs::EthernetInterface &a,
|
||||
const slsDetectorDefs::EthernetInterface &b) {
|
||||
operator|( const slsDetectorDefs::EthernetInterface &a,
|
||||
const slsDetectorDefs::EthernetInterface &b) {
|
||||
return slsDetectorDefs::EthernetInterface(static_cast<int32_t>(a) |
|
||||
static_cast<int32_t>(b));
|
||||
};
|
||||
|
||||
inline bool operator&(const slsDetectorDefs::EthernetInterface &a,
|
||||
const slsDetectorDefs::EthernetInterface &b) {
|
||||
return (static_cast<int32_t>(a) & static_cast<int32_t>(b));
|
||||
inline slsDetectorDefs::EthernetInterface operator&( const slsDetectorDefs::EthernetInterface &a,
|
||||
const slsDetectorDefs::EthernetInterface &b) {
|
||||
return slsDetectorDefs::EthernetInterface(static_cast<int32_t>(a) & static_cast<int32_t>(b));
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -653,3 +653,4 @@ using Positions = const std::vector<int> &;
|
||||
using defs = slsDetectorDefs;
|
||||
} // namespace sls
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user