Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkXYZMolReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXYZMolReader.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00039 #ifndef __vtkXYZMolReader_h
00040 #define __vtkXYZMolReader_h
00041 
00042 #include "vtkMoleculeReaderBase.h"
00043 
00044 
00045 class VTK_IO_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkXYZMolReader,vtkMoleculeReaderBase);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00051   static vtkXYZMolReader *New();
00052 
00054   virtual int CanReadFile(const char* name);
00055 
00057 
00059   vtkSetMacro(TimeStep, int);
00060   vtkGetMacro(TimeStep, int);
00062 
00064 
00065   vtkGetMacro(MaxTimeStep, int);
00067 
00068 protected:
00069   vtkXYZMolReader();
00070   ~vtkXYZMolReader();
00071 
00072   void ReadSpecificMolecule(FILE* fp);
00073 
00076   char* GetNextLine(FILE* fp, char* line, int maxlen);
00077 
00078   int GetLine1(const char* line, int *cnt);
00079   int GetLine2(const char* line, char *name);
00080   int GetAtom(const char* line, char* atom, float *x);
00081 
00082   void InsertAtom(const char* atom, float *pos);
00083 
00084   vtkSetMacro(MaxTimeStep, int);
00085 
00086   int TimeStep;
00087   int MaxTimeStep;
00088 
00089 private:
00090   vtkXYZMolReader(const vtkXYZMolReader&);  // Not implemented.
00091   void operator=(const vtkXYZMolReader&);  // Not implemented.
00092 };
00093 
00094 #endif