SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::PyOutputWrapper Class Reference

#include <PyOutputWrapper.h>

Collaboration diagram for SourceXtractor::PyOutputWrapper:

Public Member Functions

 PyOutputWrapper (Elements::Logging &logger)
void close ()
int fileno () const
void flush ()
bool isatty () const
bool readable () const
std::string read (int)
std::string readline (int)
boost::python::list readlines (int)
int seek (int, int)
bool seekable () const
int tell () const
void truncate (int)
bool writable () const
int write (const boost::python::object &)
void writelines (const boost::python::list &)

Public Attributes

const bool closed

Private Attributes

Elements::Logging m_logger
std::ostringstream m_buffer

Detailed Description

File-like object used to redirect stdout and stderr from Python into Elements' logger

Definition at line 36 of file PyOutputWrapper.h.

Constructor & Destructor Documentation

◆ PyOutputWrapper()

SourceXtractor::PyOutputWrapper::PyOutputWrapper ( Elements::Logging & logger)
explicit

Definition at line 31 of file PyOutputWrapper.cpp.

References closed, Euclid::Configuration::logger, and m_logger.

Member Function Documentation

◆ close()

void SourceXtractor::PyOutputWrapper::close ( )

Definition at line 33 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ fileno()

int SourceXtractor::PyOutputWrapper::fileno ( ) const

Definition at line 38 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ flush()

void SourceXtractor::PyOutputWrapper::flush ( )

Definition at line 44 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ isatty()

bool SourceXtractor::PyOutputWrapper::isatty ( ) const

Definition at line 47 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ read()

std::string SourceXtractor::PyOutputWrapper::read ( int )

Definition at line 55 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ readable()

bool SourceXtractor::PyOutputWrapper::readable ( ) const

Definition at line 51 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ readline()

std::string SourceXtractor::PyOutputWrapper::readline ( int )

Definition at line 61 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ readlines()

bp::list SourceXtractor::PyOutputWrapper::readlines ( int )

Definition at line 67 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ seek()

int SourceXtractor::PyOutputWrapper::seek ( int ,
int  )

Definition at line 73 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ seekable()

bool SourceXtractor::PyOutputWrapper::seekable ( ) const

Definition at line 79 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ tell()

int SourceXtractor::PyOutputWrapper::tell ( ) const

Definition at line 83 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ truncate()

void SourceXtractor::PyOutputWrapper::truncate ( int )

Definition at line 89 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ writable()

bool SourceXtractor::PyOutputWrapper::writable ( ) const

Definition at line 94 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

◆ write()

int SourceXtractor::PyOutputWrapper::write ( const boost::python::object & )

Definition at line 98 of file PyOutputWrapper.cpp.

References std::string::c_str(), std::wstring::c_str(), m_buffer, m_logger, std::string::size(), and std::wstring::size().

Referenced by SourceXtractor::BOOST_PYTHON_MODULE(), and writelines().

Here is the call graph for this function:

◆ writelines()

void SourceXtractor::PyOutputWrapper::writelines ( const boost::python::list & )

Definition at line 130 of file PyOutputWrapper.cpp.

References write().

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

Here is the call graph for this function:

Member Data Documentation

◆ closed

const bool SourceXtractor::PyOutputWrapper::closed

Definition at line 42 of file PyOutputWrapper.h.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE(), and PyOutputWrapper().

◆ m_buffer

std::ostringstream SourceXtractor::PyOutputWrapper::m_buffer
private

Definition at line 65 of file PyOutputWrapper.h.

Referenced by write().

◆ m_logger

Elements::Logging SourceXtractor::PyOutputWrapper::m_logger
private

Definition at line 64 of file PyOutputWrapper.h.

Referenced by PyOutputWrapper(), and write().


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