cisst-saw
Loading...
Searching...
No Matches
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
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://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
71class cmnLODOutputMultiplexer: public std::ostream
72{
73private:
76 cmnLODOutputMultiplexer(const cmnLODOutputMultiplexer & other);
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
103 cmnLODOutputMultiplexer & Ref(void)
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
A Streambuffer class that allows output to multiple streambuf objects for Level of Detail information...
Definition cmnLODMultiplexerStreambuf.h:109
cmnLODOutputMultiplexer & Ref(void)
Definition cmnLODOutputMultiplexer.h:103
cmnLODOutputMultiplexer(SinkType *multiplexer, cmnLogLevel level)
Definition cmnLODOutputMultiplexer.h:88
void SetLOD(cmnLogLevel lod)
Definition cmnLODOutputMultiplexer.h:118
std::ostream BaseType
Definition cmnLODOutputMultiplexer.h:83
cmnLODMultiplexerStreambuf< char_type > SinkType
Definition cmnLODOutputMultiplexer.h:81
char char_type
Definition cmnLODOutputMultiplexer.h:79
cmnLogLevel GetLOD(void) const
Definition cmnLODOutputMultiplexer.h:111
Types for dynamic control of output messages.
Definition cmnMultiplexerStreambufProxy.h:88
short cmnLogLevel
Definition cmnLogLoD.h:55
Description of types for dynamic control of output messages.
Portability across compilers and operating systems tools.