SDFile.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: SDFile.h,v 1.15 2005/12/23 17:01:45 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_FORMAT_SDFILE_H
00008 #define BALL_FORMAT_SDFILE_H
00009 
00010 #ifndef BALL_FORMAT_MOLFILE_H
00011 # include <BALL/FORMAT/MOLFile.h>
00012 #endif
00013 
00014 namespace BALL 
00015 {
00024   class BALL_EXPORT SDFile
00025     : public MOLFile
00026   {
00027     public:
00028 
00029     BALL_CREATE(SDFile)
00030 
00031     
00034 
00037     SDFile()
00038       ;
00039 
00042     SDFile(const String& filename, File::OpenMode open_mode = std::ios::in)
00043       throw(Exception::FileNotFound);
00044 
00047     SDFile(const SDFile& file)
00048       throw(Exception::FileNotFound);
00049 
00051     virtual ~SDFile()
00052       ;
00053     
00055 
00059     
00065     virtual bool write(const System& system)
00066       throw(File::CannotWrite);
00067 
00070     virtual bool write(const Molecule& molecule)
00071       throw(File::CannotWrite);
00072 
00075     virtual bool read(System& system)
00076       throw(Exception::ParseError);
00077 
00080     virtual Molecule* read()
00081       throw(Exception::ParseError);
00082 
00093     void disableAtoms()
00094       ;
00095 
00099     void enableAtoms()
00100       ;
00101 
00103     const SDFile& operator = (const SDFile& file)
00104       ;
00105 
00107 
00108     protected:
00109 
00114     void readPropertyBlock_(Molecule& molecule);
00115 
00120     void writePropertyBlock_(const Molecule& molecule);
00121 
00124     bool read_atoms_;
00125   };
00126 } // namespace BALL
00127 
00128 #endif // BALL_FORMAT_SDFILE_H