The Gaudi Framework  v31r0 (aeb156f0)
GaudiPython::CallbackStreamBuf Class Reference

#include <GaudiPython/CallbackStreamBuf.h>

Inheritance diagram for GaudiPython::CallbackStreamBuf:
Collaboration diagram for GaudiPython::CallbackStreamBuf:

Classes

class  PyObject_t
 

Public Member Functions

 CallbackStreamBuf (PyObject *self)
 CallbackStreamBuf constructor. More...
 
int sync () override
 reimplementation of stringbuf::sync() More...
 
- Public Member Functions inherited from std::stringbuf
pptr (T...args)
 
epptr (T...args)
 
eback (T...args)
 
setp (T...args)
 
sputbackc (T...args)
 
sgetc (T...args)
 
stringbuf (T...args)
 
sungetc (T...args)
 
pubseekoff (T...args)
 
seekoff (T...args)
 
str (T...args)
 
sync (T...args)
 
xsputn (T...args)
 
pbase (T...args)
 
pubimbue (T...args)
 
showmanyc (T...args)
 
egptr (T...args)
 
seekpos (T...args)
 
underflow (T...args)
 
setbuf (T...args)
 
gbump (T...args)
 
in_avail (T...args)
 
swap (T...args)
 
pbackfail (T...args)
 
sputc (T...args)
 
xsgetn (T...args)
 
uflow (T...args)
 
gptr (T...args)
 
sputn (T...args)
 
sgetn (T...args)
 
sbumpc (T...args)
 
overflow (T...args)
 
operator= (T...args)
 
pbump (T...args)
 
pubsetbuf (T...args)
 
pubsync (T...args)
 
imbue (T...args)
 
setg (T...args)
 
snextc (T...args)
 
getloc (T...args)
 
pubseekpos (T...args)
 

Private Attributes

PyObject_t m_self
 
std::array< char, 512 > m_callbackBuff
 

Detailed Description

Definition at line 16 of file CallbackStreamBuf.h.

Constructor & Destructor Documentation

GaudiPython::CallbackStreamBuf::CallbackStreamBuf ( PyObject *  self)

CallbackStreamBuf constructor.

Definition at line 29 of file CallbackStreamBuf.cpp.

29 : m_self( self ) {}

Member Function Documentation

int GaudiPython::CallbackStreamBuf::sync ( )
override

reimplementation of stringbuf::sync()

Definition at line 34 of file CallbackStreamBuf.cpp.

34  {
35  size_t length;
36  char* x;
37  for ( length = 0, x = pbase(); x < epptr(); ++x, ++length )
38  ;
39  // getting in a null terminated buffer the characters
41  m_callbackBuff[std::min( length, m_callbackBuff.size() )] = '\0';
42  // calling the python method
44  // reseting in/out buffer pointers
45  setp( pbase(), pbase() );
46  setg( eback(), eback(), eback() );
47  return 0;
48 }
std::array< char, 512 > m_callbackBuff
T min(T...args)
T data(T...args)
T memcpy(T...args)
T size(T...args)
T pbase(T...args)
T setg(T...args)
T eback(T...args)
T setp(T...args)
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition: Algorithm.cpp:28

Member Data Documentation

std::array<char, 512> GaudiPython::CallbackStreamBuf::m_callbackBuff
private

Definition at line 31 of file CallbackStreamBuf.h.

PyObject_t GaudiPython::CallbackStreamBuf::m_self
private

Definition at line 30 of file CallbackStreamBuf.h.


The documentation for this class was generated from the following files: