29 #ifndef PYRAP_PYCVALUEHOLDER_H
30 #define PYRAP_PYCVALUEHOLDER_H
35 #include <boost/python.hpp>
39 namespace casacore {
namespace python {
58 return boost::python::incref(
makeobject(c).ptr());
66 boost::python::converter::registry::push_back(
69 boost::python::type_id<ValueHolder>());
78 boost::python::converter::rvalue_from_python_stage1_data* data);
static ValueHolder makeValueHolder(PyObject *obj_ptr)
Make a ValueHolder from all possible python data types.
static void * convertible(PyObject *obj_ptr)
Check if it is a type we can convert.
static PyObject * convert(ValueHolder const &c)
static ValueHolder toVector(PyObject *obj_ptr)
Make a vector from a python sequence.
A class to convert a ValueHolder to/from Python objects.
static boost::python::object makeobject(ValueHolder const &)
Register the ValueHolder conversion.
void register_convert_casa_valueholder()
static DataType checkDataType(PyObject *obj_ptr)
Get (and check) the data type in a python sequence.
A holder for a value of any basic Casacore data type.
const Double c
Fundamental physical constants (SI units):
static void construct(PyObject *obj_ptr, boost::python::converter::rvalue_from_python_stage1_data *data)
Constructs a ValueHolder from a Python object.