VTK  9.3.20240726
vtkXYZMolReader.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
17#ifndef vtkXYZMolReader_h
18#define vtkXYZMolReader_h
19
20#include "vtkIOChemistryModule.h" // For export macro
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKIOCHEMISTRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
25{
26public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
31
36 virtual int CanReadFile(VTK_FILEPATH const char* name);
37
39
43 vtkSetMacro(TimeStep, int);
44 vtkGetMacro(TimeStep, int);
46
48
51 vtkGetMacro(MaxTimeStep, int);
53
54protected:
56 ~vtkXYZMolReader() override;
57
58 void ReadSpecificMolecule(FILE* fp) override;
59
64 char* GetNextLine(FILE* fp, char* line, int maxlen);
65
66 int GetLine1(const char* line, int* cnt);
67 int GetLine2(const char* line, char* name);
68 int GetAtom(const char* line, char* atom, float* x);
69
70 void InsertAtom(const char* atom, float* pos);
71
72 vtkSetMacro(MaxTimeStep, int);
73
76
77private:
78 vtkXYZMolReader(const vtkXYZMolReader&) = delete;
79 void operator=(const vtkXYZMolReader&) = delete;
80};
81
82VTK_ABI_NAMESPACE_END
83#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Read molecular data files.
read Molecular Data files
char * GetNextLine(FILE *fp, char *line, int maxlen)
Get next line that is not a comment.
static vtkXYZMolReader * New()
virtual int CanReadFile(VTK_FILEPATH const char *name)
Test whether the file with the given name can be read by this reader.
int GetAtom(const char *line, char *atom, float *x)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InsertAtom(const char *atom, float *pos)
~vtkXYZMolReader() override
int GetLine1(const char *line, int *cnt)
int GetLine2(const char *line, char *name)
void ReadSpecificMolecule(FILE *fp) override
#define VTK_FILEPATH