forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TPyBufferFactory.h
53 lines (42 loc) · 2.05 KB
/
TPyBufferFactory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// @(#)root/pyroot:$Id$
// Author: Wim Lavrijsen, Apr 2004
#ifndef PYROOT_TPYBUFFERFACTORY_H
#define PYROOT_TPYBUFFERFACTORY_H
namespace PyROOT {
/** Factory for python buffers of non-string type
@author WLAV
@date 10/28/2004
@version 1.5
*/
class TPyBufferFactory {
public:
static TPyBufferFactory* Instance();
PyObject* PyBuffer_FromMemory( Bool_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Bool_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Char_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Char_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( UChar_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( UChar_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Short_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Short_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( UShort_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( UShort_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Int_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Int_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( UInt_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( UInt_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Long_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Long_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( ULong_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( ULong_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Float_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Float_t* buf, PyObject* sizeCallback );
PyObject* PyBuffer_FromMemory( Double_t* buf, Py_ssize_t size = -1 );
PyObject* PyBuffer_FromMemory( Double_t* buf, PyObject* sizeCallback );
protected:
TPyBufferFactory();
~TPyBufferFactory();
};
typedef TPyBufferFactory BufFac_t;
} // namespace PyROOT
#endif // !PYROOT_TPYBUFFERFACTORY_H