Viskores  1.0
VTKDataSetWriter.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_io_DataSetWriter_h
19 #define viskores_io_DataSetWriter_h
20 
21 #include <viskores/cont/DataSet.h>
22 
24 
25 namespace viskores
26 {
27 namespace io
28 {
29 
30 // Might want to place this somewhere else.
31 enum struct FileType
32 {
33  ASCII,
34  BINARY
35 };
36 
42 class VISKORES_IO_EXPORT VTKDataSetWriter
43 {
44 public:
45  VISKORES_CONT VTKDataSetWriter(const char* fileName);
47  VISKORES_CONT VTKDataSetWriter(const std::string& fileName);
48 
50  VISKORES_CONT void WriteDataSet(const viskores::cont::DataSet& dataSet) const;
51 
54  VISKORES_CONT viskores::io::FileType GetFileType() const;
55 
57  VISKORES_CONT void SetFileType(viskores::io::FileType type);
62 
63 private:
64  std::string FileName;
66 
67 }; //struct VTKDataSetWriter
68 }
69 } //namespace viskores::io
70 
71 #endif //viskores_io_DataSetWriter_h
viskores::io::VTKDataSetWriter::SetFileTypeToAscii
void SetFileTypeToAscii()
Set whether the file will be written in ASCII or binary format.
Definition: VTKDataSetWriter.h:59
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores_io_export.h
viskores::io::FileType::BINARY
@ BINARY
viskores::io::FileType
FileType
Definition: VTKDataSetWriter.h:31
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::io::VTKDataSetWriter::FileName
std::string FileName
Definition: VTKDataSetWriter.h:64
viskores::io::VTKDataSetWriter::SetFileTypeToBinary
void SetFileTypeToBinary()
Set whether the file will be written in ASCII or binary format.
Definition: VTKDataSetWriter.h:61
viskores::io::FileType::ASCII
@ ASCII
viskores::io::VTKDataSetWriter
Reads a legacy VTK file.
Definition: VTKDataSetWriter.h:42
DataSet.h