Loading...
Searching...
No Matches
PDBRecords.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_FORMAT_PDBRECORDS_H
#define BALL_FORMAT_PDBRECORDS_H
#include <vector>
#include <stdexcept>
#ifndef BALL_DATATYPE_HASHMAP_H
# include <BALL/DATATYPE/hashMap.h>
#endif
#ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
# include <BALL/CONCEPT/persistenceManager.h>
#endif
namespace BALL
{
class BALL_EXPORT PDBRecords
: public PersistentObject
{
public:
/* STL compatibility typedefs */
typedef std::vector<String>::iterator Iterator;
typedef std::vector<String>::iterator iterator;
typedef std::vector<String>::const_iterator ConstIterator;
typedef std::vector<String>::const_iterator const_iterator;
typedef std::vector<String>::reverse_iterator ReverseIterator;
typedef std::vector<String>::reverse_iterator reverse_iterator;
typedef std::vector<String>::const_reverse_iterator ConstReverseIterator;
typedef std::vector<String>::const_reverse_iterator const_reverse_iterator;
typedef String value_type;
typedef String ValueType;
typedef String& reference;
typedef String& Reference;
typedef const String& const_reference;
typedef const String& ConstReference;
typedef std::vector<String>::difference_type difference_type;
typedef std::vector<String>::difference_type DifferenceType;
typedef std::vector<String>::size_type size_type;
typedef std::vector<String>::size_type SizeType;
BALL_CREATE(PDBRecords)
PDBRecords() ;
PDBRecords(const PDBRecords& pdbi) ;
virtual ~PDBRecords() ;
PDBRecords& operator = (const PDBRecords& rhs);
ConstIterator begin() const { return records_.begin(); }
Iterator begin() { return records_.begin(); }
ConstIterator end() const { return records_.end(); }
Iterator end() { return records_.end(); }
ConstReverseIterator rbegin() const { return records_.rbegin(); }
ReverseIterator rbegin() { return records_.rbegin(); }
ConstReverseIterator rend() const { return records_.rend(); }
ReverseIterator rend() { return records_.rend(); }
SizeType size() const { return records_.size(); }
SizeType max_size() const { return records_.max_size(); }
SizeType capacity() const { return records_.capacity(); }
bool empty() const { return records_.empty(); }
void clear() { records_.clear(); }
void resize(SizeType sz, ValueType c = ValueType()) { records_.resize(sz, c); }
Reference front() { return records_.front(); }
ConstReference front() const { return records_.front(); }
Reference back() { return records_.back(); }
ConstReference back() const { return records_.back(); }
void push_back(ConstReference x) { records_.push_back(x); }
void insert(Iterator pos, ConstReference value) { records_.insert(pos, value); }
void insert(Iterator pos, SizeType n, ConstReference value) { records_.insert(pos, n, value); }
void pop_back() { records_.pop_back(); }
Iterator erase(Iterator pos) { return records_.erase(pos); }
Iterator erase(Iterator first, Iterator last) { return records_.erase(first, last); }
bool operator == (const PDBRecords& rhs) const { return records_ == rhs.records_; }
bool operator != (const PDBRecords& rhs) const { return records_ != rhs.records_; }
bool operator < (const PDBRecords& rhs) const { return records_ < rhs.records_; }
bool operator > (const PDBRecords& rhs) const { return records_ > rhs.records_; }
bool operator <= (const PDBRecords& rhs) const { return records_ <= rhs.records_; }
bool operator >= (const PDBRecords& rhs) const { return records_ >= rhs.records_; }
void swap(PDBRecords& rhs) { records_.swap(rhs.records_); }
ConstReference operator [] (SizeType n) const { return records_[n]; }
Reference operator [] (SizeType n) { return records_[n]; }
ConstReference at(SizeType n) const { return records_.at(n); }
Reference at(SizeType n) { return records_.at(n); }
//void write(PersistenceManager& pm) const;
void persistentWrite(PersistenceManager& pm, const char* name) const;
//bool read(PersistenceManager& pm);
void persistentRead(PersistenceManager& pm);
protected:
std::vector<String> records_;
};
} // namespace BALL
#endif // BALL_FORMAT_PDBRECORDS_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::PDBRecords::at
ConstReference at(SizeType n) const
Definition PDBRecords.h:149
BALL::PDBRecords::begin
ConstIterator begin() const
Definition PDBRecords.h:81
BALL::PDBRecords::clear
void clear()
Clear function of the OCI, doing nothing here.
Definition PDBRecords.h:105
BALL::PDBRecords::capacity
SizeType capacity() const
Definition PDBRecords.h:101
BALL::PDBRecords::records_
std::vector< String > records_
The PDB record buffer.
Definition PDBRecords.h:174
BALL::PDBRecords::Reference
String & Reference
Definition PDBRecords.h:48
BALL::PDBRecords::pop_back
void pop_back()
Definition PDBRecords.h:123
BALL::PDBRecords::back
ConstReference back() const
Definition PDBRecords.h:115
BALL::PDBRecords::const_iterator
std::vector< String >::const_iterator const_iterator
Definition PDBRecords.h:40
BALL::PDBRecords::ConstIterator
std::vector< String >::const_iterator ConstIterator
Definition PDBRecords.h:39
BALL::PDBRecords::size_type
std::vector< String >::size_type size_type
Definition PDBRecords.h:53
BALL::PDBRecords::insert
void insert(Iterator pos, SizeType n, ConstReference value)
Definition PDBRecords.h:121
BALL::PDBRecords::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name) const
BALL::PDBRecords::resize
void resize(SizeType sz, ValueType c=ValueType())
Definition PDBRecords.h:107
BALL::PDBRecords::at
Reference at(SizeType n)
Definition PDBRecords.h:153
BALL::PDBRecords::reference
String & reference
Definition PDBRecords.h:47
BALL::PDBRecords::empty
bool empty() const
Definition PDBRecords.h:103
BALL::PDBRecords::const_reverse_iterator
std::vector< String >::const_reverse_iterator const_reverse_iterator
Definition PDBRecords.h:44
BALL::PDBRecords::end
ConstIterator end() const
Definition PDBRecords.h:85
BALL::PDBRecords::ReverseIterator
std::vector< String >::reverse_iterator ReverseIterator
Definition PDBRecords.h:41
BALL::PDBRecords::reverse_iterator
std::vector< String >::reverse_iterator reverse_iterator
Definition PDBRecords.h:42
BALL::PDBRecords::SizeType
std::vector< String >::size_type SizeType
Definition PDBRecords.h:54
BALL::PDBRecords::insert
void insert(Iterator pos, ConstReference value)
Definition PDBRecords.h:119
BALL::PDBRecords::ValueType
String ValueType
Definition PDBRecords.h:46
BALL::PDBRecords::Iterator
std::vector< String >::iterator Iterator
Definition PDBRecords.h:37
BALL::PDBRecords::DifferenceType
std::vector< String >::difference_type DifferenceType
Definition PDBRecords.h:52
BALL::PDBRecords::front
ConstReference front() const
Definition PDBRecords.h:111
BALL::PDBRecords::rend
ReverseIterator rend()
Definition PDBRecords.h:95
BALL::PDBRecords::iterator
std::vector< String >::iterator iterator
Definition PDBRecords.h:38
BALL::PDBRecords::back
Reference back()
Definition PDBRecords.h:113
BALL::PDBRecords::ConstReverseIterator
std::vector< String >::const_reverse_iterator ConstReverseIterator
Definition PDBRecords.h:43
BALL::PDBRecords::swap
void swap(PDBRecords &rhs)
Definition PDBRecords.h:141
BALL::PDBRecords::ConstReference
const String & ConstReference
Definition PDBRecords.h:50
BALL::PDBRecords::value_type
String value_type
Definition PDBRecords.h:45
BALL::PDBRecords::rbegin
ReverseIterator rbegin()
Definition PDBRecords.h:91
BALL::PDBRecords::rend
ConstReverseIterator rend() const
Definition PDBRecords.h:93
BALL::PDBRecords::push_back
void push_back(ConstReference x)
Definition PDBRecords.h:117
BALL::PDBRecords::const_reference
const String & const_reference
Definition PDBRecords.h:49
BALL::PDBRecords::max_size
SizeType max_size() const
Definition PDBRecords.h:99
BALL::PDBRecords::size
SizeType size() const
Definition PDBRecords.h:97
BALL::PDBRecords::PDBRecords
PDBRecords()
BALL::PDBRecords::begin
Iterator begin()
Definition PDBRecords.h:83
BALL::PDBRecords::persistentRead
void persistentRead(PersistenceManager &pm)
BALL::PDBRecords::erase
Iterator erase(Iterator pos)
Definition PDBRecords.h:125
BALL::PDBRecords::difference_type
std::vector< String >::difference_type difference_type
Definition PDBRecords.h:51
BALL::PDBRecords::erase
Iterator erase(Iterator first, Iterator last)
Definition PDBRecords.h:127
BALL::PDBRecords::front
Reference front()
Definition PDBRecords.h:109
BALL::PDBRecords::rbegin
ConstReverseIterator rbegin() const
Definition PDBRecords.h:89
BALL::PDBRecords::end
Iterator end()
Definition PDBRecords.h:87
BALL::PersistenceManager
Definition persistenceManager.h:73
BALL::PersistentObject::PersistentObject
PersistentObject()
Definition persistentObject.h:39
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
hashMap.h
BALL
Definition constants.h:13
persistenceManager.h