CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

CSCDCCExaminer::OStream Class Reference

List of all members.

Classes

class  buffer

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 (std::string nm)
void sign (const char *nm)

Private Attributes

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

Detailed Description

Definition at line 33 of file CSCDCCExaminer.h.


Constructor & Destructor Documentation

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

Definition at line 56 of file CSCDCCExaminer.h.

:std::ostream(std::cout.rdbuf()),buff(),stream(std::cout.rdbuf()),null(&buff),name(""){}
CSCDCCExaminer::OStream::OStream ( std::ostream &  str) [inline]

Definition at line 57 of file CSCDCCExaminer.h.

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

Member Function Documentation

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

Definition at line 43 of file CSCDCCExaminer.h.

References null.

{ rdbuf(null);   }
template<class T >
std::ostream& CSCDCCExaminer::OStream::operator<< ( const T val) [inline]

Definition at line 52 of file CSCDCCExaminer.h.

References name.

                                                                      {
                        return (*(std::ostream*)this)<<name<<val;
                }
void CSCDCCExaminer::OStream::redirect ( std::ostream &  str) [inline]

Definition at line 47 of file CSCDCCExaminer.h.

References null, and stream.

Referenced by CSCDCCExaminer::CSCDCCExaminer().

                                              {
                        stream = str.rdbuf(); tie(&str);
                        if( rdbuf() != null ) rdbuf(stream);
                }
void CSCDCCExaminer::OStream::show ( void  ) [inline]

Definition at line 42 of file CSCDCCExaminer.h.

References stream.

{ rdbuf(stream); }
void CSCDCCExaminer::OStream::sign ( std::string  nm) [inline]

Definition at line 44 of file CSCDCCExaminer.h.

References name.

{ name=nm; }
void CSCDCCExaminer::OStream::sign ( const char *  nm) [inline]

Definition at line 45 of file CSCDCCExaminer.h.

References name.

{ name=nm; }

Member Data Documentation

Definition at line 36 of file CSCDCCExaminer.h.

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

Definition at line 39 of file CSCDCCExaminer.h.

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

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

Definition at line 38 of file CSCDCCExaminer.h.

Referenced by hide(), and redirect().

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

Definition at line 37 of file CSCDCCExaminer.h.

Referenced by redirect(), and show().