py::class_<Exposed, Options...> syten::Pyten::expose_syten_class | ( | py::module & | module, |
std::string | name, | ||
std::string | docstring = std::string("") , |
||
bool enable_load_in_ctor] | [[maybe_unused] = false , |
||
bool enable_default_ctor] | [[maybe_unused] = true |
||
) |
Creates a py::class_<Exposed, Options>
object and some standard functions to it.
These functions are:
__init__
/ctormem_size()
function returning totalSize(obj)
The following two functions are only added if the class has a non-zero Boost serialisation version:
__init__
/ctor taking a single string to construct the object from a filesave(str)
function to save the object to a fileA brief headline describing the C++ class name is automatically added to the start of the docstring.
References std::string::c_str(), syten::demangle_type(), syten::loadInputRef(), syten::ostreamshiftable(), syten::save(), std::stringstream::str(), syten::MemoryUsage::totalSize(), and syten::verbose().