SourceXtractorPlusPlus  0.15
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
SourceXtractor::PyOutputWrapper Class Reference

#include <PyOutputWrapper.h>

Collaboration diagram for SourceXtractor::PyOutputWrapper:
[legend]

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

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

Definition at line 31 of file PyOutputWrapper.cpp.

Member Function Documentation

void SourceXtractor::PyOutputWrapper::close ( )

Definition at line 33 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

int SourceXtractor::PyOutputWrapper::fileno ( ) const

Definition at line 38 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

void SourceXtractor::PyOutputWrapper::flush ( )

Definition at line 44 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

bool SourceXtractor::PyOutputWrapper::isatty ( ) const

Definition at line 47 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 55 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

bool SourceXtractor::PyOutputWrapper::readable ( ) const

Definition at line 51 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 61 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 67 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 73 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

bool SourceXtractor::PyOutputWrapper::seekable ( ) const

Definition at line 79 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

int SourceXtractor::PyOutputWrapper::tell ( ) const

Definition at line 83 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

void SourceXtractor::PyOutputWrapper::truncate ( int  )

Definition at line 89 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

bool SourceXtractor::PyOutputWrapper::writable ( ) const

Definition at line 94 of file PyOutputWrapper.cpp.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 98 of file PyOutputWrapper.cpp.

References std::wstring::c_str(), std::string::c_str(), Elements::Logging::info(), m_buffer, m_logger, std::wstring::size(), and std::ostringstream::str().

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

Here is the call graph for this function:

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

const bool SourceXtractor::PyOutputWrapper::closed

Definition at line 42 of file PyOutputWrapper.h.

Referenced by SourceXtractor::BOOST_PYTHON_MODULE().

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

Definition at line 65 of file PyOutputWrapper.h.

Referenced by write().

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

Definition at line 64 of file PyOutputWrapper.h.

Referenced by write().


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