cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstCommon
cmnOutputMultiplexer.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-04-18
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
27
#pragma once
28
29
#ifndef _cmnOutputMultiplexer_h
30
#define _cmnOutputMultiplexer_h
31
32
#include <
cisstCommon/cmnPortability.h
>
33
#include <
cisstCommon/cmnLODMultiplexerStreambuf.h
>
34
35
#include <list>
36
#include <iostream>
37
38
#include <
cisstCommon/cmnExport.h
>
39
40
80
class
CISST_EXPORT
cmnOutputMultiplexer
:
public
std::ostream
81
{
82
public
:
83
typedef
char
char_type
;
84
typedef
std::ostream
ChannelType
;
85
87
typedef
std::list<ChannelType *>
ChannelContainerType
;
88
90
cmnOutputMultiplexer
() :
ChannelType
(&
m_Streambuf
) {}
91
95
ChannelType
&
AddChannel
(
ChannelType
* channel);
96
102
ChannelType
&
RemoveChannel
(
ChannelType
* channel);
103
104
110
const
ChannelContainerType
&
GetChannels
()
const
{
111
return
m_ChannelContainer
;
112
}
113
114
protected
:
115
ChannelContainerType
m_ChannelContainer
;
116
117
cmnLODMultiplexerStreambuf<char_type>
m_Streambuf
;
118
};
119
120
121
#endif
// _cmnOutputMultiplexer_h
122
cmnLODMultiplexerStreambuf
A Streambuffer class that allows output to multiple streambuf objects for Level of Detail information...
Definition
cmnLODMultiplexerStreambuf.h:109
cmnOutputMultiplexer::m_ChannelContainer
ChannelContainerType m_ChannelContainer
Definition
cmnOutputMultiplexer.h:115
cmnOutputMultiplexer::m_Streambuf
cmnLODMultiplexerStreambuf< char_type > m_Streambuf
Definition
cmnOutputMultiplexer.h:117
cmnOutputMultiplexer::RemoveChannel
ChannelType & RemoveChannel(ChannelType *channel)
cmnOutputMultiplexer::AddChannel
ChannelType & AddChannel(ChannelType *channel)
cmnOutputMultiplexer::char_type
char char_type
Definition
cmnOutputMultiplexer.h:83
cmnOutputMultiplexer::ChannelType
std::ostream ChannelType
Definition
cmnOutputMultiplexer.h:84
cmnOutputMultiplexer::ChannelContainerType
std::list< ChannelType * > ChannelContainerType
Definition
cmnOutputMultiplexer.h:87
cmnOutputMultiplexer::GetChannels
const ChannelContainerType & GetChannels() const
Definition
cmnOutputMultiplexer.h:110
cmnOutputMultiplexer::cmnOutputMultiplexer
cmnOutputMultiplexer()
Definition
cmnOutputMultiplexer.h:90
cmnExport.h
Macros to export the symbols of cisstCommon (in a Dll).
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
cmnLODMultiplexerStreambuf.h
Type Definitions for dynamic control of output messages.
cmnPortability.h
Portability across compilers and operating systems tools.
Generated by
1.18.0