VTK  9.0.3
vtkXYZMolReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYZMolReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkXYZMolReader_h
27 #define vtkXYZMolReader_h
28 
29 #include "vtkIOGeometryModule.h" // For export macro
30 #include "vtkMoleculeReaderBase.h"
31 
32 class VTKIOGEOMETRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  static vtkXYZMolReader* New();
39 
44  virtual int CanReadFile(const char* name);
45 
47 
51  vtkSetMacro(TimeStep, int);
52  vtkGetMacro(TimeStep, int);
54 
56 
59  vtkGetMacro(MaxTimeStep, int);
61 
62 protected:
64  ~vtkXYZMolReader() override;
65 
66  void ReadSpecificMolecule(FILE* fp) override;
67 
72  char* GetNextLine(FILE* fp, char* line, int maxlen);
73 
74  int GetLine1(const char* line, int* cnt);
75  int GetLine2(const char* line, char* name);
76  int GetAtom(const char* line, char* atom, float* x);
77 
78  void InsertAtom(const char* atom, float* pos);
79 
80  vtkSetMacro(MaxTimeStep, int);
81 
82  int TimeStep;
84 
85 private:
86  vtkXYZMolReader(const vtkXYZMolReader&) = delete;
87  void operator=(const vtkXYZMolReader&) = delete;
88 };
89 
90 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
read Molecular Data files
read Molecular Data files
static vtkXYZMolReader * New()
char * GetNextLine(FILE *fp, char *line, int maxlen)
Get next line that is not a comment.
virtual int CanReadFile(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
@ name
Definition: vtkX3D.h:225