VTK-m  2.2
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 
35 {
36 public:
37  VTKM_CONT VTKDataSetWriter(const char* fileName);
39  VTKM_CONT VTKDataSetWriter(const std::string& fileName);
40 
42  VTKM_CONT void WriteDataSet(const vtkm::cont::DataSet& dataSet) const;
43 
46  VTKM_CONT vtkm::io::FileType GetFileType() const;
47 
49  VTKM_CONT void SetFileType(vtkm::io::FileType type);
54 
55 private:
56  std::string FileName;
58 
59 }; //struct VTKDataSetWriter
60 }
61 } //namespace vtkm::io
62 
63 #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::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm_io_export.h
VTKM_IO_EXPORT
#define VTKM_IO_EXPORT
Definition: vtkm_io_export.h:44
vtkm::io::FileType::BINARY
@ BINARY
vtkm::io::FileType::ASCII
@ ASCII
vtkm::io::VTKDataSetWriter::SetFileTypeToBinary
void SetFileTypeToBinary()
Set whether the file will be written in ASCII or binary format.
Definition: VTKDataSetWriter.h:53
vtkm::io::VTKDataSetWriter
Reads a legacy VTK file.
Definition: VTKDataSetWriter.h:34
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::io::VTKDataSetWriter::FileName
std::string FileName
Definition: VTKDataSetWriter.h:56
vtkm::io::VTKDataSetWriter::SetFileTypeToAscii
void SetFileTypeToAscii()
Set whether the file will be written in ASCII or binary format.
Definition: VTKDataSetWriter.h:51
DataSet.h