cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cmnLODOutputMultiplexer.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Ofri Sadowsky
7  Created on: 2002-05-20
8 
9  (C) Copyright 2002-2007 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 
26 #pragma once
27 
28 #ifndef _cmnLODOutputMultiplexer_h
29 #define _cmnLODOutputMultiplexer_h
30 
33 
34 #include <list>
35 #include <iostream>
36 
71 class cmnLODOutputMultiplexer: public std::ostream
72 {
73 private:
77 
78  public:
79  typedef char char_type;
80 
82 
83  typedef std::ostream BaseType;
84 
89  : BaseType(NULL), StreambufProxy(multiplexer, level) {
90  if (multiplexer != NULL) {
91  init(&StreambufProxy);
92  }
93  }
94 
104  {
105  return *this;
106  }
107 
111  cmnLogLevel GetLOD(void) const {
112  return StreambufProxy.GetLOD();
113  }
114 
118  void SetLOD(cmnLogLevel lod) {
119  StreambufProxy.SetLOD(lod);
120  }
121 
122 
123  private:
125 
126 };
127 
128 
129 #endif // _cmnLODOutputMultiplexer_h
130 
Portability across compilers and operating systems tools.
Description of types for dynamic control of output messages.
char char_type
Definition: cmnLODOutputMultiplexer.h:79
cmnLogLevel GetLOD(void) const
Definition: cmnLODOutputMultiplexer.h:111
void SetLOD(cmnLogLevel lod)
Definition: cmnLODOutputMultiplexer.h:118
short cmnLogLevel
Definition: cmnLogLoD.h:55
std::ostream BaseType
Definition: cmnLODOutputMultiplexer.h:83
cmnLODOutputMultiplexer(SinkType *multiplexer, cmnLogLevel level)
Definition: cmnLODOutputMultiplexer.h:88
void SetLOD(cmnLogLevel level)
Definition: cmnMultiplexerStreambufProxy.h:110
cmnLogLevel GetLOD(void) const
Definition: cmnMultiplexerStreambufProxy.h:105
Types for dynamic control of output messages.
Definition: cmnLODOutputMultiplexer.h:71
cmnLODOutputMultiplexer & Ref(void)
Definition: cmnLODOutputMultiplexer.h:103
cmnLODMultiplexerStreambuf< char_type > SinkType
Definition: cmnLODOutputMultiplexer.h:81