mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
autogen enums
This commit is contained in:
parent
a9e375ed34
commit
dd84337ef3
@ -9,19 +9,7 @@ enums.cpp
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
# def remove_comments(text):
|
||||
# def replacer(match):
|
||||
# s = match.group(0)
|
||||
# if s.startswith('/'):
|
||||
# return " " # note: a space and not an empty string
|
||||
# else:
|
||||
# return s
|
||||
# pattern = re.compile(
|
||||
# r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
|
||||
# re.DOTALL | re.MULTILINE
|
||||
# )
|
||||
# return re.sub(pattern, replacer, text)
|
||||
from parse import remove_comments
|
||||
|
||||
def extract_enums(lines):
|
||||
line_iter = iter(lines)
|
||||
|
@ -278,4 +278,10 @@ void init_enums(py::module &m) {
|
||||
slsDetectorDefs::detectorModeType::INTERPOLATING)
|
||||
.value("ANALOG", slsDetectorDefs::detectorModeType::ANALOG)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::burstMode>(Defs, "burstMode")
|
||||
.value("BURST_OFF", slsDetectorDefs::burstMode::BURST_OFF)
|
||||
.value("BURST_INTERNAL", slsDetectorDefs::burstMode::BURST_INTERNAL)
|
||||
.value("BURST_EXTERNAL", slsDetectorDefs::burstMode::BURST_EXTERNAL)
|
||||
.export_values();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user