IGSTK
Main Page
Namespaces
Classes
Files
File List
File Members
Source
igstkFLTKTextBufferLogOutput.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Image Guided Surgery Software Toolkit
4
Module: $RCSfile: igstkFLTKTextBufferLogOutput.h,v $
5
Language: C++
6
Date: $Date: 2008-02-11 01:41:50 $
7
Version: $Revision: 1.9 $
8
9
Copyright (c) ISC Insight Software Consortium. All rights reserved.
10
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
18
#ifndef __igstkFLTKTextBufferLogOutput_h
19
#define __igstkFLTKTextBufferLogOutput_h
20
21
#include <iostream>
22
#include <string>
23
24
#include "itkObject.h"
25
#include "itkObjectFactory.h"
26
#include "itkSimpleFastMutexLock.h"
27
#include "itkLogOutput.h"
28
29
#include <FL/Fl_Text_Buffer.H>
30
31
#include "
igstkMacros.h
"
32
#include "
igstkStateMachine.h
"
33
34
35
namespace
igstk
36
{
37
45
class
FLTKTextBufferLogOutput
:
public
::itk::LogOutput
46
{
47
48
public
:
49
51
igstkStandardClassTraitsMacro
(
FLTKTextBufferLogOutput
, ::itk::LogOutput )
52
53
54
igstkLoggerMacro
()
55
56
57
public
:
58
59
typedef
Fl_Text_Buffer
StreamType
;
60
typedef
StreamType
*
StreamPointerType
;
61
63
igstkGetMacro
(Stream,
StreamPointerType
);
64
66
void
SetStream
(
StreamType
&Stream);
67
69
virtual
void
Flush
();
70
72
virtual
void
Write
(
double
timestamp);
73
75
virtual
void
Write
(std::string
const
&content);
76
78
virtual
void
Write
(std::string
const
&content,
double
timestamp);
79
80
protected
:
82
FLTKTextBufferLogOutput
();
83
85
virtual
~FLTKTextBufferLogOutput
();
86
88
virtual
void
PrintSelf
( std::ostream& os, itk::Indent indent )
const
;
89
90
private
:
91
93
StreamPointerType
m_Stream;
94
96
itk::SimpleFastMutexLock m_Mutex;
97
};
98
99
}
// end namespace igstk
100
101
#endif //__igstk_FLTKTextBufferLogOutput_h_
Generated on Thu Mar 20 2014 13:04:04 for IGSTK by
1.8.1.2