The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
GaudiPython::CallbackStreamBuf Class Reference

#include </builds/gaudi/Gaudi/GaudiPython/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.
 
int sync () override
 reimplementation of stringbuf::sync()
 

Private Attributes

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

Detailed Description

Definition at line 25 of file CallbackStreamBuf.h.

Constructor & Destructor Documentation

◆ CallbackStreamBuf()

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

Member Function Documentation

◆ sync()

int GaudiPython::CallbackStreamBuf::sync ( )
override

reimplementation of stringbuf::sync()

Definition at line 45 of file CallbackStreamBuf.cpp.

45 {
46 size_t length;
47 char* x;
48 for ( length = 0, x = pbase(); x < epptr(); ++x, ++length )
49 ;
50 // getting in a null terminated buffer the characters
51 memcpy( m_callbackBuff.data(), pbase(), std::min( length, m_callbackBuff.size() ) );
52 m_callbackBuff[std::min( length, m_callbackBuff.size() )] = '\0';
53 // calling the python method
55 // reseting in/out buffer pointers
56 setp( pbase(), pbase() );
57 setg( eback(), eback(), eback() );
58 return 0;
59}
std::array< char, 512 > m_callbackBuff
GAUDI_API StatusCode call_python_method(PyObject *self, const char *method)
call the python method
Definition Algorithm.cpp:48

Member Data Documentation

◆ m_callbackBuff

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

Definition at line 40 of file CallbackStreamBuf.h.

◆ m_self

PyObject_t GaudiPython::CallbackStreamBuf::m_self
private

Definition at line 39 of file CallbackStreamBuf.h.


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