Public Member Functions | Private Attributes | List of all members
om::OStream Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/viewer/OStream.h"

Public Member Functions

 OStream ()
 
void Flush ()
 
void SetLogViewer (om::LogViewer *lv)
 
template<class T >
OStreamoperator<< (const T &a)
 

Private Attributes

std::ostringstream fBuf
 
om::LogViewerfLogViewer
 

Detailed Description

Define an output stream the streams to the log viewer

Definition at line 10 of file OStream.h.

Constructor & Destructor Documentation

OStream::OStream ( )

Definition at line 11 of file OStream.cxx.

11 : fLogViewer(0) { }
om::LogViewer * fLogViewer
Definition: OStream.h:18

Member Function Documentation

void OStream::Flush ( )

Definition at line 15 of file OStream.cxx.

References om::cout, allTimeWatchdog::endl, fBuf, fLogViewer, and om::LogViewer::PrintToScreen().

Referenced by operator<<().

16 {
17  if (fLogViewer) {
19  }
20  else {
21  std::cout << fBuf.str() << std::endl;
22  }
23  fBuf.clear();
24 }
std::ostringstream fBuf
Definition: OStream.h:17
om::LogViewer * fLogViewer
Definition: OStream.h:18
OStream cout
Definition: OStream.cxx:6
void PrintToScreen(const std::string &s)
Definition: LogViewer.cxx:17
template<class T >
OStream& om::OStream::operator<< ( const T a)
inline

Definition at line 21 of file OStream.h.

References a, om::cerr, om::cout, and Flush().

21  {
22  fBuf.str("");
23  fBuf << a;
24  this->Flush();
25  return *this;
26  }
std::ostringstream fBuf
Definition: OStream.h:17
const double a
void Flush()
Definition: OStream.cxx:15
void OStream::SetLogViewer ( om::LogViewer lv)

Definition at line 28 of file OStream.cxx.

References fLogViewer.

Referenced by om::GUIMain::GUIMain().

29 {
30  fLogViewer = lv;
31 }
om::LogViewer * fLogViewer
Definition: OStream.h:18

Member Data Documentation

std::ostringstream om::OStream::fBuf
private

Definition at line 17 of file OStream.h.

Referenced by Flush().

om::LogViewer* om::OStream::fLogViewer
private

Definition at line 18 of file OStream.h.

Referenced by Flush(), and SetLogViewer().


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