Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef ERRSTREAMBUFFER_HH
#define ERRSTREAMBUFFER_HH
//--------------------------------------------------------------------------
//
// $Id: ErrStreamBuffer.hh,v 1.1.1.1 2005/03/29 17:04:19 steinke Exp $
//
// Environment:
// This software was developed for the BaBar collaboration. If you
// use all or part of it, please give an appropriate acknowledgement.
//
// Copyright Information:
// Copyright (C) 2004 California Institute of Technology
//
//------------------------------------------------------------------------
//-----------------
// C/C++ Headers --
//-----------------
#include <sstream>
//----------------------
// Base Class Headers --
//----------------------
#include "ErrLogger/ErrStream.hh"
//-------------------------------
// Collaborating Class Headers --
//-------------------------------
//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
class ErrLog;
// ---------------------
// -- Class Interface --
// ---------------------
/**
* This class implements a stream that buffers output when written to,
* making it available back to the ErrLog implementation when a message is
* completed with endmsg.
*
* It is used in the special message logging schemes in OstErrLogger and
* QtrErrLog.
*/
class ErrStreamBuffer : public ErrStream {
public:
ErrStreamBuffer( ErrLog* );
virtual ~ErrStreamBuffer();
protected:
// virtual methods
virtual void doEndmsg( );
private:
std::ostringstream _bufferStream;
// Disable copy-construction and assignment.
ErrStreamBuffer( const ErrStreamBuffer& );
ErrStreamBuffer& operator=( const ErrStreamBuffer& );
};
#endif // ERRSTREAMBUFFER_HH