CMS 3D CMS Logo

CSCDCCExaminer::OStream Class Reference

List of all members.

Public Member Functions

void hide (void)
template<class T>
std::ostream & operator<< (const T &val)
 OStream (std::ostream &str)
 OStream (void)
void redirect (std::ostream &str)
void show (void)
void sign (const char *nm)
void sign (std::string nm)

Private Attributes

buffer buff
std::string name
std::streambuf * null
std::streambuf * stream

Classes

class  buffer


Detailed Description

Definition at line 28 of file CSCDCCExaminer.h.


Constructor & Destructor Documentation

CSCDCCExaminer::OStream::OStream ( void   )  [inline]

Definition at line 51 of file CSCDCCExaminer.h.

00051 :std::ostream(std::cout.rdbuf()),buff(),stream(std::cout.rdbuf()),null(&buff),name(""){}

CSCDCCExaminer::OStream::OStream ( std::ostream &  str  )  [inline]

Definition at line 52 of file CSCDCCExaminer.h.

00052 :std::ostream(str.rdbuf()),buff(),stream(str.rdbuf()),null(&buff),name(""){}


Member Function Documentation

void CSCDCCExaminer::OStream::hide ( void   )  [inline]

Definition at line 38 of file CSCDCCExaminer.h.

References null.

00038 { rdbuf(null);   }

template<class T>
std::ostream& CSCDCCExaminer::OStream::operator<< ( const T &  val  )  [inline]

Definition at line 47 of file CSCDCCExaminer.h.

References name.

00047                                                                       {
00048                         return (*(std::ostream*)this)<<name<<val;
00049                 }

void CSCDCCExaminer::OStream::redirect ( std::ostream &  str  )  [inline]

Definition at line 42 of file CSCDCCExaminer.h.

References null, and stream.

Referenced by CSCDCCExaminer::CSCDCCExaminer().

00042                                               {
00043                         stream = str.rdbuf(); tie(&str);
00044                         if( rdbuf() != null ) rdbuf(stream);
00045                 }

void CSCDCCExaminer::OStream::show ( void   )  [inline]

Definition at line 37 of file CSCDCCExaminer.h.

References stream.

00037 { rdbuf(stream); }

void CSCDCCExaminer::OStream::sign ( const char *  nm  )  [inline]

Definition at line 40 of file CSCDCCExaminer.h.

References name.

00040 { name=nm; }

void CSCDCCExaminer::OStream::sign ( std::string  nm  )  [inline]

Definition at line 39 of file CSCDCCExaminer.h.

References name.

00039 { name=nm; }


Member Data Documentation

buffer CSCDCCExaminer::OStream::buff [private]

Definition at line 31 of file CSCDCCExaminer.h.

std::string CSCDCCExaminer::OStream::name [private]

Definition at line 34 of file CSCDCCExaminer.h.

Referenced by operator<<(), and sign().

std::streambuf* CSCDCCExaminer::OStream::null [private]

Definition at line 33 of file CSCDCCExaminer.h.

Referenced by hide(), and redirect().

std::streambuf* CSCDCCExaminer::OStream::stream [private]

Definition at line 32 of file CSCDCCExaminer.h.

Referenced by redirect(), and show().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:17:10 2009 for CMSSW by  doxygen 1.5.4