SourceXtractorPlusPlus
0.12
Please provide a description of the project.
SEImplementation
SEImplementation
PythonConfig
PyOutputWrapper.h
Go to the documentation of this file.
1
17
/*
18
* @file PyOutputWrapper.h
19
* @author Alejandro Alvarez Ayllon
20
*/
21
22
#ifndef _SEIMPLEMENTATION_PYOUTPUTWRAPPER_H
23
#define _SEIMPLEMENTATION_PYOUTPUTWRAPPER_H
24
25
#include <strstream>
26
#include <
ElementsKernel/Logging.h
>
27
#include <boost/python/list.hpp>
28
#include <boost/python/object.hpp>
29
30
namespace
SourceXtractor
{
31
36
class
PyOutputWrapper
{
37
public
:
38
39
PyOutputWrapper
(
Elements::Logging
&
logger
);
40
41
// Can not be closed, but expose the API
42
const
bool
closed
;
43
void
close
();
44
45
// Dummy implementations: do nothing except either ignore or raise an exception
46
int
fileno
()
const
;
47
void
flush
();
48
bool
isatty
()
const
;
49
bool
readable
()
const
;
50
std::string
read
(
int
);
51
std::string
readline
(
int
);
52
boost::python::list
readlines
(
int
);
53
int
seek
(
int
,
int
);
54
bool
seekable
()
const
;
55
int
tell
()
const
;
56
void
truncate
(
int
);
57
58
// These do something!
59
bool
writable
()
const
;
60
int
write
(
const
boost::python::object&);
61
void
writelines
(
const
boost::python::list&);
62
63
private
:
64
Elements::Logging
m_logger
;
65
std::ostringstream
m_buffer
;
66
};
67
68
}
// end namespace SourceXtractor
69
70
#endif // _SEIMPLEMENTATION_PYOUTPUTWRAPPER_H
SourceXtractor::PyOutputWrapper::readable
bool readable() const
Definition:
PyOutputWrapper.cpp:51
SourceXtractor::PyOutputWrapper::read
std::string read(int)
Definition:
PyOutputWrapper.cpp:55
SourceXtractor::logger
static Elements::Logging logger
Definition:
PluginManager.cpp:45
SourceXtractor::PyOutputWrapper::seek
int seek(int, int)
Definition:
PyOutputWrapper.cpp:73
Logging.h
SourceXtractor::PyOutputWrapper::flush
void flush()
Definition:
PyOutputWrapper.cpp:44
SourceXtractor::PyOutputWrapper::closed
const bool closed
Definition:
PyOutputWrapper.h:42
SourceXtractor::PyOutputWrapper::fileno
int fileno() const
Definition:
PyOutputWrapper.cpp:38
SourceXtractor::PyOutputWrapper::tell
int tell() const
Definition:
PyOutputWrapper.cpp:83
std::string
STL class.
SourceXtractor::PyOutputWrapper::readline
std::string readline(int)
Definition:
PyOutputWrapper.cpp:61
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::PyOutputWrapper::m_buffer
std::ostringstream m_buffer
Definition:
PyOutputWrapper.h:65
SourceXtractor::PyOutputWrapper
Definition:
PyOutputWrapper.h:36
std::ostringstream
STL class.
SourceXtractor::PyOutputWrapper::readlines
boost::python::list readlines(int)
Definition:
PyOutputWrapper.cpp:67
Elements::Logging
SourceXtractor::PyOutputWrapper::writable
bool writable() const
Definition:
PyOutputWrapper.cpp:94
SourceXtractor::PyOutputWrapper::isatty
bool isatty() const
Definition:
PyOutputWrapper.cpp:47
SourceXtractor::PyOutputWrapper::PyOutputWrapper
PyOutputWrapper(Elements::Logging &logger)
Definition:
PyOutputWrapper.cpp:31
SourceXtractor::PyOutputWrapper::close
void close()
Definition:
PyOutputWrapper.cpp:33
SourceXtractor::PyOutputWrapper::write
int write(const boost::python::object &)
Definition:
PyOutputWrapper.cpp:98
SourceXtractor::PyOutputWrapper::m_logger
Elements::Logging m_logger
Definition:
PyOutputWrapper.h:64
SourceXtractor::PyOutputWrapper::truncate
void truncate(int)
Definition:
PyOutputWrapper.cpp:89
SourceXtractor::PyOutputWrapper::writelines
void writelines(const boost::python::list &)
Definition:
PyOutputWrapper.cpp:130
SourceXtractor::PyOutputWrapper::seekable
bool seekable() const
Definition:
PyOutputWrapper.cpp:79
Generated by
1.8.14