00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_FORMAT_PDBINFO_H 00006 #define BALL_FORMAT_PDBINFO_H 00007 00008 #include <vector> 00009 #include <stdexcept> 00010 00011 #ifndef BALL_FORMAT_PDBRECORDS_H 00012 # include <BALL/FORMAT/PDBRecords.h> 00013 #endif 00014 00015 #ifndef BALL_FORMAT_PDBDEFS_H 00016 # include <BALL/FORMAT/PDBdefs.h> 00017 #endif 00018 00019 #ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H 00020 # include <BALL/CONCEPT/persistenceManager.h> 00021 #endif 00022 00023 namespace BALL 00024 { 00025 00031 class BALL_EXPORT PDBInfo 00032 : public PersistentObject 00033 { 00034 public: 00035 00036 BALL_CREATE(PDBInfo) 00037 00038 00040 00041 PDBInfo() ; 00043 PDBInfo(const PDBInfo& pdbi) ; 00045 virtual ~PDBInfo() ; 00047 virtual void clear(); 00049 00053 00054 PDBInfo& operator = (const PDBInfo& rhs); 00056 00060 00061 bool operator == (const PDBInfo& rhs) const; 00063 bool operator != (const PDBInfo& rhs) const; 00065 00069 00070 PDBRecords& getSkippedRecords() { return skipped_records_; } 00072 const PDBRecords& getSkippedRecords() const { return skipped_records_; } 00074 PDBRecords& getInvalidRecords() { return invalid_records_; } 00076 const PDBRecords& getInvalidRecords() const { return invalid_records_; } 00078 const String& getFilename() const { return filename_; } 00080 void setFilename(const String& filename) { filename_ = filename; } 00082 const String& getID() const { return id_; } 00084 void setID(const String& id) { id_ = id; } 00086 Size getNumberOfRecords() const { return number_of_records_; } 00088 void setNumberOfRecords(Size n) { number_of_records_ = n; } 00090 Size getNumberOfModels() const { return number_of_models_; } 00092 Size& getNumberOfModels() { return number_of_models_; } 00094 void setNumberOfModels(Size n) { number_of_models_ = n; } 00096 Position getCurrentModel() const { return model_read_; } 00098 Position& getCurentModel() { return model_read_; } 00100 void setCurrentModel(Position n) { model_read_ = n; } 00102 Size getNumberOfATOMRecords() const { return number_of_atom_records_; } 00104 Size& getNumberOfATOMRecords() { return number_of_atom_records_; } 00106 void setNumberOfATOMRecords(Size n) { number_of_atom_records_ = n; } 00108 Size getNumberOfHETATMRecords() const { return number_of_hetatm_records_; } 00110 Size& getNumberOfHETATMRecords() { return number_of_hetatm_records_; } 00112 void setNumberOfHETATMRecords(Size n) { number_of_hetatm_records_ = n; } 00114 const String& getName() const { return name_; } 00116 void setName(const String& name) { name_ = name; } 00121 std::list<Position> getRecordIndices(PDB::RecordType record) const; 00123 00127 00130 //void write(PersistenceManager& pm) const; 00131 void persistentWrite(PersistenceManager& pm, const char* name) const; 00132 00135 //bool read(PersistenceManager& pm); 00136 void persistentRead(PersistenceManager& pm); 00137 00139 00140 00141 protected: 00143 PDBRecords skipped_records_; 00145 PDBRecords invalid_records_; 00147 String filename_; 00149 String id_; 00151 String name_; 00153 Size number_of_records_; 00155 Size number_of_models_; 00157 Position model_read_; 00159 Size number_of_atom_records_; 00161 Size number_of_hetatm_records_; 00162 }; 00163 00164 } // namespace BALL 00165 00166 #endif // BALL_FORMAT_PDBINFO_H