VTK-m
2.0
vtkm
io
VTKDataSetWriter.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_io_DataSetWriter_h
11
#define vtk_m_io_DataSetWriter_h
12
13
#include <
vtkm/cont/DataSet.h
>
14
15
#include <vtkm/io/vtkm_io_export.h>
16
17
namespace
vtkm
18
{
19
namespace
io
20
{
21
22
// Might want to place this somewhere else.
23
enum struct
FileType
24
{
25
ASCII
,
26
BINARY
27
};
28
29
struct
VTKM_IO_EXPORT
VTKDataSetWriter
30
{
31
public
:
32
VTKM_CONT
VTKDataSetWriter
(
const
char
* fileName);
33
VTKM_CONT
VTKDataSetWriter
(
const
std::string& fileName);
34
35
VTKM_CONT
void
WriteDataSet(
const
vtkm::cont::DataSet
& dataSet)
const
;
36
39
VTKM_CONT
vtkm::io::FileType
GetFileType()
const
;
40
43
VTKM_CONT
void
SetFileType(
vtkm::io::FileType
type);
44
VTKM_CONT
void
SetFileTypeToAscii
() { this->SetFileType(
vtkm::io::FileType::ASCII
); }
45
VTKM_CONT
void
SetFileTypeToBinary
() { this->SetFileType(
vtkm::io::FileType::BINARY
); }
47
48
private
:
49
std::string
FileName
;
50
vtkm::io::FileType
FileType
=
vtkm::io::FileType::ASCII
;
51
52
};
//struct VTKDataSetWriter
53
}
54
}
//namespace vtkm::io
55
56
#endif //vtk_m_io_DataSetWriter_h
vtkm
Groups connected points that have the same field value.
Definition:
Atomic.h:19
vtkm::io::FileType
FileType
Definition:
VTKDataSetWriter.h:23
vtkm::io::VTKDataSetWriter::FileName
std::string FileName
Definition:
VTKDataSetWriter.h:49
vtkm::cont::DataSet
Definition:
DataSet.h:34
vtkm::io::FileType::BINARY
@ BINARY
vtkm::io::FileType::ASCII
@ ASCII
vtkm::io::VTKDataSetWriter::SetFileTypeToBinary
VTKM_CONT void SetFileTypeToBinary()
Set whether the file will be written in ASCII or binary format.
Definition:
VTKDataSetWriter.h:45
vtkm::io::VTKDataSetWriter::SetFileTypeToAscii
VTKM_CONT void SetFileTypeToAscii()
Set whether the file will be written in ASCII or binary format.
Definition:
VTKDataSetWriter.h:44
VTKM_CONT
#define VTKM_CONT
Definition:
ExportMacros.h:57
vtkm::io::VTKDataSetWriter
Definition:
VTKDataSetWriter.h:29
DataSet.h
Generated by
1.8.17