VTK
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 
33 class VTKIOGEOMETRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
38 
39  static vtkXYZMolReader *New();
40 
45  virtual int CanReadFile(const char* name);
46 
48 
52  vtkSetMacro(TimeStep, int);
53  vtkGetMacro(TimeStep, int);
55 
57 
60  vtkGetMacro(MaxTimeStep, int);
62 
63 protected:
65  ~vtkXYZMolReader() VTK_OVERRIDE;
66 
67  void ReadSpecificMolecule(FILE* fp) VTK_OVERRIDE;
68 
73  char* GetNextLine(FILE* fp, char* line, int maxlen);
74 
75  int GetLine1(const char* line, int *cnt);
76  int GetLine2(const char* line, char *name);
77  int GetAtom(const char* line, char* atom, float *x);
78 
79  void InsertAtom(const char* atom, float *pos);
80 
81  vtkSetMacro(MaxTimeStep, int);
82 
83  int TimeStep;
84  int MaxTimeStep;
85 
86 private:
87  vtkXYZMolReader(const vtkXYZMolReader&) VTK_DELETE_FUNCTION;
88  void operator=(const vtkXYZMolReader&) VTK_DELETE_FUNCTION;
89 };
90 
91 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
read Molecular Data files
static vtkPolyDataAlgorithm * New()
read Molecular Data files
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.