cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstCommon
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
31
#include <
cisstCommon/cmnPortability.h
>
32
#include <
cisstCommon/cmnMultiplexerStreambufProxy.h
>
33
34
#include <list>
35
#include <iostream>
36
71
class
cmnLODOutputMultiplexer:
public
std::ostream
72
{
73
private
:
76
cmnLODOutputMultiplexer(
const
cmnLODOutputMultiplexer & other);
77
78
public
:
79
typedef
char
char_type
;
80
81
typedef
cmnLODMultiplexerStreambuf<char_type>
SinkType
;
82
83
typedef
std::ostream
BaseType
;
84
88
cmnLODOutputMultiplexer
(
SinkType
* multiplexer,
cmnLogLevel
level)
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
:
124
cmnMultiplexerStreambufProxy<char_type>
StreambufProxy;
125
126
};
127
128
129
#endif
// _cmnLODOutputMultiplexer_h
130
cmnLODMultiplexerStreambuf
A Streambuffer class that allows output to multiple streambuf objects for Level of Detail information...
Definition
cmnLODMultiplexerStreambuf.h:109
cmnLODOutputMultiplexer::Ref
cmnLODOutputMultiplexer & Ref(void)
Definition
cmnLODOutputMultiplexer.h:103
cmnLODOutputMultiplexer::cmnLODOutputMultiplexer
cmnLODOutputMultiplexer(SinkType *multiplexer, cmnLogLevel level)
Definition
cmnLODOutputMultiplexer.h:88
cmnLODOutputMultiplexer::SetLOD
void SetLOD(cmnLogLevel lod)
Definition
cmnLODOutputMultiplexer.h:118
cmnLODOutputMultiplexer::BaseType
std::ostream BaseType
Definition
cmnLODOutputMultiplexer.h:83
cmnLODOutputMultiplexer::SinkType
cmnLODMultiplexerStreambuf< char_type > SinkType
Definition
cmnLODOutputMultiplexer.h:81
cmnLODOutputMultiplexer::char_type
char char_type
Definition
cmnLODOutputMultiplexer.h:79
cmnLODOutputMultiplexer::GetLOD
cmnLogLevel GetLOD(void) const
Definition
cmnLODOutputMultiplexer.h:111
cmnMultiplexerStreambufProxy
Types for dynamic control of output messages.
Definition
cmnMultiplexerStreambufProxy.h:88
cmnLogLevel
short cmnLogLevel
Definition
cmnLogLoD.h:55
cmnMultiplexerStreambufProxy.h
Description of types for dynamic control of output messages.
cmnPortability.h
Portability across compilers and operating systems tools.
Generated by
1.18.0