VTK-m
2.0
vtkm
rendering
raytracing
Logger.h
Go to the documentation of this file.
1
//============================================================================
2
// Copyright (c) Kitware, Inc.
3
// All rights reserved.
4
// See LICENSE.txt for details.
5
//
6
// This software is distributed WITHOUT ANY WARRANTY; without even
7
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
// PURPOSE. See the above copyright notice for more information.
9
//============================================================================
10
#ifndef vtk_m_rendering_raytracing_Loggable_h
11
#define vtk_m_rendering_raytracing_Loggable_h
12
13
#include <sstream>
14
#include <stack>
15
16
#include <
vtkm/Types.h
>
17
#include <vtkm/rendering/vtkm_rendering_export.h>
18
19
namespace
vtkm
20
{
21
namespace
rendering
22
{
23
namespace
raytracing
24
{
25
26
class
VTKM_RENDERING_EXPORT
Logger
27
{
28
public
:
29
~
Logger
();
30
static
Logger
* GetInstance();
31
void
OpenLogEntry(
const
std::string& entryName);
32
void
CloseLogEntry(
const
vtkm::Float64
& entryTime);
33
void
Clear();
34
template
<
typename
T>
35
void
AddLogData
(
const
std::string key,
const
T& value)
36
{
37
this->Stream << key <<
" "
<< value <<
"\n"
;
38
}
39
40
std::stringstream& GetStream();
41
42
protected
:
43
Logger
();
44
Logger
(
Logger
const
&);
45
std::stringstream
Stream
;
46
static
class
Logger
*
Instance
;
47
std::stack<std::string>
Entries
;
48
};
49
}
50
}
51
}
// namespace vtkm::rendering::raytracing
52
#endif
vtkm
Groups connected points that have the same field value.
Definition:
Atomic.h:19
vtkm::rendering::raytracing::Logger::AddLogData
void AddLogData(const std::string key, const T &value)
Definition:
Logger.h:35
Types.h
vtkm::rendering::raytracing::Logger::Entries
std::stack< std::string > Entries
Definition:
Logger.h:47
vtkm::rendering::raytracing::Logger::Instance
static class Logger * Instance
Definition:
Logger.h:46
vtkm::rendering::raytracing::Logger
Definition:
Logger.h:26
vtkm::Float64
double Float64
Definition:
Types.h:155
vtkm::rendering::raytracing::Logger::Stream
std::stringstream Stream
Definition:
Logger.h:45
Generated by
1.8.17