Mercurial > hg > vampy
diff PyFeature.h @ 31:4f1894c7591b vampy2
Created Vampy2 branch
author | fazekasgy |
---|---|
date | Sun, 20 Sep 2009 17:31:20 +0000 |
parents | |
children | c905122f79e7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PyFeature.h Sun Sep 20 17:31:20 2009 +0000 @@ -0,0 +1,36 @@ +#ifndef _PYFEATURE_H_ +#define _PYFEATURE_H_ + +#include "vamp-sdk/Plugin.h" +// #include "PyTypeInterface.h" + +typedef struct { + PyObject_HEAD + PyObject *dict; /* Attributes dictionary */ + // Vamp::Plugin::Feature *feature; + /// pointer to type interface required + // PyTypeInterface ti; +} FeatureObject; + +PyAPI_DATA(PyTypeObject) Feature_Type; + +#define PyFeature_CheckExact(v) ((v)->ob_type == &Feature_Type) +#define PyFeature_Check(v) PyObject_TypeCheck(v, &Feature_Type) +///fast macro version as per API convention +#define PyFeature_AS_DICT(v) ((const FeatureObject* const) (v))->dict + + +/* PyFeature C++ API */ + +/// Not required: we will never have to pass a feature back from the wrapper +// PyAPI_FUNC(PyObject *) +// PyFeature_FromFeature(Vamp::RealTime&); + +// PyAPI_FUNC(const Vamp::Plugin::Feature*) +// PyFeature_AsFeature (PyObject *self); + +///fast macro version as per API convention +// #define PyFeature_AS_FEATURE(v) ((const FeatureObject* const) (v))->feature + + +#endif \ No newline at end of file