VTK  9.7.20260723
vtkXYZMolReader2.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
16
17#ifndef vtkXYZMolReader2_h
18#define vtkXYZMolReader2_h
19
20#include "vtkIOChemistryModule.h" // For export macro
22
23#include <istream> // for std::istream
24#include <vector> // for std::vector
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkMolecule;
29
30class VTKIOCHEMISTRY_EXPORT vtkXYZMolReader2 : public vtkMoleculeAlgorithm
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
42 void SetOutput(vtkMolecule*) override;
44
46
52
54
59 static bool CanReadFile(VTK_FILEPATH const char* filename);
60 static bool CanReadFile(vtkResourceStream* stream);
62
63protected:
65 ~vtkXYZMolReader2() override = default;
66
69
70 std::string FileName;
71 std::vector<istream::pos_type> FilePositions; // to store beginning of each step
72 std::vector<double> TimeSteps;
73
74private:
75 vtkXYZMolReader2(const vtkXYZMolReader2&) = delete;
76 void operator=(const vtkXYZMolReader2&) = delete;
77};
78
79VTK_ABI_NAMESPACE_END
80#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
class describing a molecule
Definition vtkMolecule.h:84
Abstract class used for custom streams.
static vtkXYZMolReader2 * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
~vtkXYZMolReader2() override=default
std::vector< istream::pos_type > FilePositions
vtkSetStdStringFromCharMacro(FileName)
Get/Set the name of the XYZ Molecule file.
static bool CanReadFile(const char *filename)
A simple, non-exhaustive check to see if the given file or stream is a valid XYZ Molecule file.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static bool CanReadFile(vtkResourceStream *stream)
A simple, non-exhaustive check to see if the given file or stream is a valid XYZ Molecule file.
void SetOutput(vtkMolecule *) override
Get/Set the output (vtkMolecule) that the reader will fill.
vtkGetCharFromStdStringMacro(FileName)
Get/Set the name of the XYZ Molecule file.
vtkMolecule * GetOutput()
Get/Set the output (vtkMolecule) that the reader will fill.
std::vector< double > TimeSteps
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_FILEPATH