PLearn 0.1
|
This class sends stuff to the PlideLog when it's flushed. More...
Public Member Functions | |
PlideLogPStreamBuf (string *s, PythonCodeSnippet *python) | |
void | outputParameters (const string &module_name, int requested_verbosity) |
Establish current-mode module-name and verbosity. | |
virtual void | flush () |
Flush actually invokes the Python function LogAppend if the string is not empty, and it empties it. | |
Protected Attributes | |
PythonCodeSnippet * | m_python |
string | m_module_name |
int | m_requested_verbosity |
Private Types | |
typedef StringPStreamBuf | inherited |
typedef StringPStreamBuf PLearn::PlideLogPStreamBuf::inherited [private] |
Reimplemented from PLearn::StringPStreamBuf.
PLearn::PlideLogPStreamBuf::PlideLogPStreamBuf | ( | string * | s, |
PythonCodeSnippet * | python | ||
) | [inline] |
Definition at line 151 of file Plide.cc.
: inherited(s, "w"), m_python(python), m_requested_verbosity(-1) { }
void PLearn::PlideLogPStreamBuf::flush | ( | ) | [virtual] |
Flush actually invokes the Python function LogAppend if the string is not empty, and it empties it.
Reimplemented from PLearn::PStreamBuf.
Definition at line 176 of file Plide.cc.
References PLearn::flush(), and PLASSERT.
{ PLASSERT( st && m_python ); inherited::flush(); if (! st->empty()) { m_python->invoke("LogAppend", m_module_name, m_requested_verbosity, *st); st->clear(); } }
void PLearn::PlideLogPStreamBuf::outputParameters | ( | const string & | module_name, |
int | requested_verbosity | ||
) |
Establish current-mode module-name and verbosity.
Definition at line 170 of file Plide.cc.
{ m_module_name = module_name; m_requested_verbosity = requested_verbosity; }
string PLearn::PlideLogPStreamBuf::m_module_name [protected] |
PythonCodeSnippet* PLearn::PlideLogPStreamBuf::m_python [protected] |
int PLearn::PlideLogPStreamBuf::m_requested_verbosity [protected] |