![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Data structure for the storage of data records found in PDB formatted data [PDB]. More...
#include <PDBData.hpp>
Public Types | |
| enum | RecordType { HEADER , OBSLTE , TITLE , SPLIT , CAVEAT , COMPND , SOURCE , KEYWDS , EXPDTA , AUTHOR , REVDAT , SPRSDE , JRNL , REMARK , DBREF , DBREF1 , DBREF2 , SEQADV , SEQRES , MODRES , HET , FORMUL , HETNAM , HETSYN , HELIX , SHEET , TURN , SSBOND , LINK , CISPEP , SITE , CRYST1 , MTRIX1 , MTRIX2 , MTRIX3 , ORIGX1 , ORIGX2 , ORIGX3 , SCALE1 , SCALE2 , SCALE3 , STRUCTURE_ID , DEPOSITION_DATE , RESOLUTION } |
| Identifies the type of PDB data record. More... | |
| typedef std::shared_ptr< PDBData > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated PDBData instances. More... | |
| typedef TypeToDataMap::value_type | Record |
| The type of a stored (record-type, record-data) pair. More... | |
| typedef TypeToDataMap::const_iterator | ConstRecordIterator |
| A constant iterator over the stored records. More... | |
| typedef TypeToDataMap::iterator | RecordIterator |
| A mutable iterator over the stored records. More... | |
Public Member Functions | |
| PDBData () | |
Constructs an empty PDBData instance. More... | |
| PDBData (const PDBData &other) | |
Constructs a copy of the PDBData instance other. More... | |
| void | clear () |
| Removes all stored records. More... | |
| std::size_t | getNumRecords () const |
| Returns the number of stored records. More... | |
| bool | isEmpty () const |
| Tells whether no records are stored. More... | |
| bool | containsRecord (const RecordType &type) const |
| Tells whether a record of the given type is stored. More... | |
| RecordIterator | getRecord (const RecordType &type) |
| Returns an iterator to the record of the given type. More... | |
| ConstRecordIterator | getRecord (const RecordType &type) const |
| Returns a constant iterator to the record of the given type. More... | |
| std::string & | getData (const RecordType &type) |
| Returns the data string associated with the given record type. More... | |
| const std::string & | getData (const RecordType &type) const |
| Returns the data string associated with the given record type. More... | |
| void | removeRecord (const RecordIterator &it) |
| Removes the record referenced by the given iterator. More... | |
| bool | removeRecord (const RecordType &type) |
| Removes the record of the given type. More... | |
| RecordIterator | setRecord (const Record &rec) |
| Stores the given record. Any pre-existing record of the same type is replaced. More... | |
| RecordIterator | setRecord (const RecordType &type, const std::string &data) |
| Stores a record built from type and data. Any pre-existing record of the same type is replaced. More... | |
| ConstRecordIterator | getRecordsBegin () const |
| Returns a constant iterator pointing to the first stored record. More... | |
| RecordIterator | getRecordsBegin () |
| Returns a mutable iterator pointing to the first stored record. More... | |
| ConstRecordIterator | getRecordsEnd () const |
| Returns a constant iterator pointing one past the last stored record. More... | |
| RecordIterator | getRecordsEnd () |
| Returns a mutable iterator pointing one past the last stored record. More... | |
| ConstRecordIterator | begin () const |
| Returns a constant iterator pointing to the first stored record (range-based for support). More... | |
| RecordIterator | begin () |
| Returns a mutable iterator pointing to the first stored record (range-based for support). More... | |
| ConstRecordIterator | end () const |
| Returns a constant iterator pointing one past the last stored record (range-based for support). More... | |
| RecordIterator | end () |
| Returns a mutable iterator pointing one past the last stored record (range-based for support). More... | |
Data structure for the storage of data records found in PDB formatted data [PDB].
| typedef std::shared_ptr<PDBData> CDPL::Biomol::PDBData::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated PDBData instances.
| typedef TypeToDataMap::value_type CDPL::Biomol::PDBData::Record |
The type of a stored (record-type, record-data) pair.
| typedef TypeToDataMap::const_iterator CDPL::Biomol::PDBData::ConstRecordIterator |
A constant iterator over the stored records.
| typedef TypeToDataMap::iterator CDPL::Biomol::PDBData::RecordIterator |
A mutable iterator over the stored records.
Identifies the type of PDB data record.
|
inline |
Constructs an empty PDBData instance.
|
inline |
Constructs a copy of the PDBData instance other.
| other | The PDBData to copy. |
| void CDPL::Biomol::PDBData::clear | ( | ) |
Removes all stored records.
| std::size_t CDPL::Biomol::PDBData::getNumRecords | ( | ) | const |
Returns the number of stored records.
| bool CDPL::Biomol::PDBData::isEmpty | ( | ) | const |
Tells whether no records are stored.
true if no records are stored, and false otherwise. | bool CDPL::Biomol::PDBData::containsRecord | ( | const RecordType & | type | ) | const |
Tells whether a record of the given type is stored.
| type | The queried record type. |
true if a record of the given type is stored, and false otherwise. | RecordIterator CDPL::Biomol::PDBData::getRecord | ( | const RecordType & | type | ) |
Returns an iterator to the record of the given type.
| type | The record type to look up. |
| ConstRecordIterator CDPL::Biomol::PDBData::getRecord | ( | const RecordType & | type | ) | const |
Returns a constant iterator to the record of the given type.
| type | The record type to look up. |
| std::string& CDPL::Biomol::PDBData::getData | ( | const RecordType & | type | ) |
Returns the data string associated with the given record type.
| type | The record type whose data is requested. |
| Base::ItemNotFound | if no record of the given type is stored. |
| const std::string& CDPL::Biomol::PDBData::getData | ( | const RecordType & | type | ) | const |
Returns the data string associated with the given record type.
| type | The record type whose data is requested. |
const reference to the data string. | Base::ItemNotFound | if no record of the given type is stored. |
| void CDPL::Biomol::PDBData::removeRecord | ( | const RecordIterator & | it | ) |
Removes the record referenced by the given iterator.
| it | Iterator referencing the record to remove. |
| bool CDPL::Biomol::PDBData::removeRecord | ( | const RecordType & | type | ) |
Removes the record of the given type.
| type | The type of the record to remove. |
true if the record was removed, and false if no matching record existed. | RecordIterator CDPL::Biomol::PDBData::setRecord | ( | const Record & | rec | ) |
Stores the given record. Any pre-existing record of the same type is replaced.
| rec | The record to store. |
| RecordIterator CDPL::Biomol::PDBData::setRecord | ( | const RecordType & | type, |
| const std::string & | data | ||
| ) |
Stores a record built from type and data. Any pre-existing record of the same type is replaced.
| type | The record type. |
| data | The record data string. |
| ConstRecordIterator CDPL::Biomol::PDBData::getRecordsBegin | ( | ) | const |
Returns a constant iterator pointing to the first stored record.
| RecordIterator CDPL::Biomol::PDBData::getRecordsBegin | ( | ) |
Returns a mutable iterator pointing to the first stored record.
| ConstRecordIterator CDPL::Biomol::PDBData::getRecordsEnd | ( | ) | const |
Returns a constant iterator pointing one past the last stored record.
| RecordIterator CDPL::Biomol::PDBData::getRecordsEnd | ( | ) |
Returns a mutable iterator pointing one past the last stored record.
| ConstRecordIterator CDPL::Biomol::PDBData::begin | ( | ) | const |
Returns a constant iterator pointing to the first stored record (range-based for support).
| RecordIterator CDPL::Biomol::PDBData::begin | ( | ) |
Returns a mutable iterator pointing to the first stored record (range-based for support).
| ConstRecordIterator CDPL::Biomol::PDBData::end | ( | ) | const |
Returns a constant iterator pointing one past the last stored record (range-based for support).
| RecordIterator CDPL::Biomol::PDBData::end | ( | ) |
Returns a mutable iterator pointing one past the last stored record (range-based for support).