1
from libcpp.string cimport string as libcpp_string
2
from libcpp.vector cimport vector as libcpp_vector
3
from libcpp.set cimport set as libcpp_set
4
from libcpp cimport bool
5
from DataValue cimport *
7
from StringList cimport *
8
from ParamNode cimport *
9
from ParamEntry cimport *
11
# this class has addons, see the ./addons folder
13
cdef extern from "<OpenMS/DATASTRUCTURES/Param.h>" namespace "OpenMS":
15
# pythonic helper functions in ../addons/Param.pyx !!!!
18
Param() nogil except +
19
Param(Param) nogil except +
20
bool operator==(Param) nogil except +
22
void setValue(String key, DataValue val, String desc, StringList tags) nogil except +
23
void setValue(String key, DataValue val, String desc) nogil except +
24
DataValue getValue(String key) nogil except +
25
ParamEntry getEntry(String) nogil except +
26
int exists(String key) nogil except +
28
void addTag(String key, String tag) nogil except +
29
void addTags(String key, StringList tags) nogil except +
30
int hasTag(String key, String tag) nogil except +
31
StringList getTags(String key) nogil except +
32
void clearTags(String key) nogil except +
34
libcpp_string getDescription(String key) nogil except +
35
void setSectionDescription(String key, String desc) nogil except +
36
libcpp_string getSectionDescription(String key) nogil except +
38
Size size() nogil except +
39
bool empty() nogil except +
41
void clear() nogil except +
42
void insert(String prefix, Param param) nogil except +
44
void remove(String key) nogil except +
45
void removeAll(String prefix) nogil except +
47
Param copy(String prefix, bool) nogil except +
48
Param copy(String prefix) nogil except +
50
# wrapped manually for overloading with dict parameter:
51
void update(Param p_old, bool add_unknow) nogil except + # wrap-ignore
52
void update(Param p_old) nogil except + # wrap-ignore
54
void merge(Param toMerge) nogil except +
56
void setDefaults(Param defaults, String previx, bool showMessage) nogil except +
57
void setDefaults(Param defaults, String previx) nogil except +
58
void setDefaults(Param defaults) nogil except +
60
void checkDefaults(String name, Param defaults, String prefix) nogil except +
61
void checkDefaults(String name, Param defaults) nogil except +
63
void setValidStrings(String key, libcpp_vector[String] strings) nogil except +
64
void setMinInt(String key, int min) nogil except +
65
void setMaxInt(String key, int max) nogil except +
66
void setMinFloat(String key, double min) nogil except +
67
void setMaxFloat(String key, double max) nogil except +
69
#void parseCommandLine(int argc, char ** argv, String prefix) # wrap-ignore
70
#void parseCommandLine(int argc, char ** argv) # wrap-ignore
73
ParamIterator begin() nogil except + # wrap-ignore
74
ParamIterator end() nogil except + # wrap-ignore
76
cdef extern from "<OpenMS/DATASTRUCTURES/Param.h>" namespace "OpenMS::Param":
78
cdef cppclass ParamIterator:
80
ParamIterator operator++() nogil except +
81
ParamIterator operator--() nogil except +
82
String getName() nogil except +
83
int operator==(ParamIterator) nogil except +
84
int operator!=(ParamIterator) nogil except +
85
int operator<(ParamIterator) nogil except +
86
int operator>(ParamIterator) nogil except +
87
int operator<=(ParamIterator) nogil except +
88
int operator>=(ParamIterator) nogil except +
89
# Returns the traceback of the opened and closed sections
90
libcpp_vector[TraceInfo] getTrace() nogil except +
92
cdef extern from "<OpenMS/DATASTRUCTURES/Param.h>" namespace "OpenMS::Param::ParamIterator":
94
cdef cppclass TraceInfo:
96
TraceInfo(String n, String d, bool o)
101
# description of the node
103
# If it was opened (true) or closed (false)