8 #ifndef PARAM_ARRAY_PYBIND_HH_ 9 #define PARAM_ARRAY_PYBIND_HH_ 20 std::list< std::string > all_members;
23 all_members.push_back(
"ParamArray" );
25 .def( pybind11::init< >() )
28 "Returns the size of the array" )
38 "True if the length is zero" )
41 "Sets the size of the array; if smaller than the current size, the extra elements are deleted" )
47 "Add a param object [value] to the specified [index] in a array" )
51 (
bool (
scarab::param_array::*)(
unsigned,
bool)
const) &scarab::param_array::get_value<bool>,
54 "Get boolean parameter array value at index, or return provided value if out of index range" )
56 (
unsigned (
scarab::param_array::*)(
unsigned,
unsigned)
const) &scarab::param_array::get_value<uint>,
59 "Get integer parameter array value at index, or return provided value if out of index range" )
64 "Get signed integer parameter array value at index, or return provided value if out of index range" )
66 (
double (
scarab::param_array::*)(
unsigned,
double)
const) &scarab::param_array::get_value<double>,
69 "Get float parameter array value at index, or return provided value if out of index range" )
74 "Get string parameter array value at index, or return provided value if out of index range" )
79 "add a param object to the end of the array")
83 "add a param object to the end of the array")
88 "adds all elements of a param_array to the end of this" )
92 "merges provided param_array, effectively replacing the current array")
96 "eliminates the value at a position in the array" )
100 "returns the param_value at the provided index and removes it from the array" )
void push_front(const param &a_value)
void merge(const param_array &an_array)
Wrapper for Python extension modules.
virtual std::string to_string() const
std::list< std::string > export_param_array(pybind11::module &mod)
void append(const param_array &an_array)
param_ptr_t remove(unsigned a_index)
Keep patient alive while nurse lives.
std::string get_value(unsigned a_index, const std::string &a_default) const
void erase(unsigned a_index)
void assign(unsigned a_index, const param &a_value)
void push_back(const param &a_value)
iterator make_iterator(Iterator first, Sentinel last, Extra &&... extra)
Makes a python iterator from a first and past-the-end C++ InputIterator.
bool typename Extra class_ & def(const char *name_, Func &&f, const Extra &... extra)
void resize(unsigned a_size)