PLearn 0.1
Public Member Functions | Protected Attributes | Private Types
PLearn::PlideLogPStreamBuf Class Reference

This class sends stuff to the PlideLog when it's flushed. More...

Inheritance diagram for PLearn::PlideLogPStreamBuf:
Inheritance graph
[legend]
Collaboration diagram for PLearn::PlideLogPStreamBuf:
Collaboration graph
[legend]

List of all members.

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

PythonCodeSnippetm_python
string m_module_name
int m_requested_verbosity

Private Types

typedef StringPStreamBuf inherited

Detailed Description

This class sends stuff to the PlideLog when it's flushed.

Definition at line 146 of file Plide.cc.


Member Typedef Documentation

Reimplemented from PLearn::StringPStreamBuf.

Definition at line 148 of file Plide.cc.


Constructor & Destructor Documentation

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)
    { }

Member Function Documentation

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();
    }
}

Here is the call graph for this function:

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;
}

Member Data Documentation

Definition at line 166 of file Plide.cc.

Definition at line 165 of file Plide.cc.

Definition at line 167 of file Plide.cc.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines