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 =========================================================================*/
28 #ifndef __vtkXYZMolReader_h
29 #define __vtkXYZMolReader_h
30 
31 #include "vtkMoleculeReaderBase.h"
32 
33 
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
40  static vtkXYZMolReader *New();
41 
43  virtual int CanReadFile(const char* name);
44 
46 
48  vtkSetMacro(TimeStep, int);
49  vtkGetMacro(TimeStep, int);
51 
53 
54  vtkGetMacro(MaxTimeStep, int);
56 
57 protected:
59  ~vtkXYZMolReader();
60 
61  void ReadSpecificMolecule(FILE* fp);
62 
65  char* GetNextLine(FILE* fp, char* line, int maxlen);
66 
67  int GetLine1(const char* line, int *cnt);
68  int GetLine2(const char* line, char *name);
69  int GetAtom(const char* line, char* atom, float *x);
70 
71  void InsertAtom(const char* atom, float *pos);
72 
73  vtkSetMacro(MaxTimeStep, int);
74 
75  int TimeStep;
77 
78 private:
79  vtkXYZMolReader(const vtkXYZMolReader&); // Not implemented.
80  void operator=(const vtkXYZMolReader&); // Not implemented.
81 };
82 
83 #endif
read Molecular Data files
virtual void ReadSpecificMolecule(FILE *fp)=0
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
read Molecular Data files
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IO_EXPORT