dlite-python-singletons#
Python singletons.
Functions
-
PyObject *dlite_python_maindict(void)#
Returns a borrowed reference to
__main__.__dict__or NULL on error.
-
PyObject *dlite_python_dliteclass(const char *classname)#
Creates a new empty singleton class in the dlite module and return it.
The name of the new class is
classname.Returns NULL on error.
-
PyObject *dlite_python_storage_base(void)#
Returns the base class for storage plugins.
-
PyObject *dlite_python_mapping_base(void)#
Returns the base class for mapping plugins.
-
PyObject *dlite_python_module_dict(void)#
Returns a pointer to the dlite module dict of the embedded interpreater or NULL on error.
-
PyObject *dlite_python_module_class(const char *classname)#
Return a borrowed reference to singleton class
classnamein the dlite module. The class is created if it doesn’t already exists.Returns NULL on error.
-
PyObject *dlite_python_module_error(DLiteErrCode code)#
Returns a borrowed reference to singleton Python exception object for the given DLite error code.
The singleton object is created the first time this function is called with a given
code. All following calles with the samecodewill return a reference to the same object.Returns NULL if
codeis out of range.