39 if (!PyArg_ParseTuple(args,
const_cast<char *
>(
"O!O!|O!i:TDirectory::WriteObject"),
47 PyErr_SetString(PyExc_TypeError,
48 "TDirectory::WriteObject must be called with a TDirectory instance as first argument");
59 if (wrtclass->IsTObject()) {
62 auto objtowrite =
static_cast<TObject *
>(wrtclass->DynamicCast(TObject::Class(), wrtobj));
64 if (option !=
nullptr) {
71 if (option !=
nullptr) {
97 if (!PyObject_IsTrue(result)) {
99 PyObject *stypestr = PyObject_Str(PyObject_Type(self));
109 PyObject_SetAttr(self, attr, result);
124 PyObject *pyclass = PyTuple_GetItem(args, 0);
135 PyObject *pyclass = PyTuple_GetItem(args, 0);
#define CPyCppyy_PyText_AsString
#define CPyCppyy_PyText_Type
TClass * GetTClass(const CPyCppyy::CPPInstance *pyobj)
PyObject * CallPyObjMethod(PyObject *obj, const char *meth)
Set of helper functions that are invoked from the C++ implementation of pythonizations.
PyObject * TDirectoryWriteObject(CPPInstance *self, PyObject *args)
Implements the WriteObject method of TDirectory This method allows to write objects into TDirectory i...
PyObject * TDirectoryGetAttr(PyObject *self, PyObject *attr)
Implements a getter to assign to TDirectory.__getattr__ Method that is assigned to TDirectory....
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
Describe directory structure in memory.
Mother of all ROOT objects.
bool AddToClass(PyObject *pyclass, const char *label, PyCFunction cfunc, int flags=METH_VARARGS)
Set of helper functions that are invoked from the pythonizors, on the Python side.
PyTypeObject CPPInstance_Type
PyObject * AddDirectoryWritePyz(PyObject *self, PyObject *args)
Add pythonisation of TDirectory::WriteObject.
PyObject * AddDirectoryGetAttrPyz(PyObject *self, PyObject *args)
Add attr syntax to TDirectory.