29 #ifndef CDPL_BIOMOL_HIERARCHYVIEW_HPP
30 #define CDPL_BIOMOL_HIERARCHYVIEW_HPP
34 #include <unordered_map>
38 #include <boost/iterator/indirect_iterator.hpp>
57 typedef std::shared_ptr<HierarchyViewModel> ModelPtr;
58 typedef std::vector<ModelPtr> ModelList;
67 typedef boost::indirect_iterator<ModelList::const_iterator, const HierarchyViewModel>
ConstModelIterator;
146 void initModelList()
const;
148 typedef std::unordered_map<std::size_t, ModelPtr> IDToModelMap;
152 mutable ModelList models;
153 mutable IDToModelMap idToModelMap;
154 mutable bool initResidues;
155 mutable bool initModels;
156 mutable std::mutex initMutex;
Definition of the preprocessor macro CDPL_BIOMOL_API.
#define CDPL_BIOMOL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of class CDPL::Biomol::HierarchyViewModel.
Definition of class CDPL::Biomol::ResidueList.
Data structure for the representation of individual biological macromolecule models.
Definition: HierarchyViewModel.hpp:57
Data structure providing a hierarchical view on biological macromolecules.
Definition: HierarchyView.hpp:55
const HierarchyViewModel & getModel(std::size_t idx) const
Returns the model at index idx.
ConstModelIterator getModelsBegin() const
Returns a constant iterator pointing to the first model.
const HierarchyViewModel & getModelByNumber(std::size_t num) const
Returns the model identified by model number num.
boost::indirect_iterator< ModelList::const_iterator, const HierarchyViewModel > ConstModelIterator
A constant iterator over the biological macromolecule models.
Definition: HierarchyView.hpp:67
const ResidueList & getResidues() const
Returns the flat list of all residues across all models of the biological macromolecule.
HierarchyView()
Constructs an empty HierarchyView instance.
std::size_t getNumModels() const
Returns the number of stored models.
void build(const Chem::MolecularGraph &molgraph)
Build the hierarchy view for the biological macromolecule represented by molgraph.
ConstModelIterator begin() const
Returns a constant iterator pointing to the first model (range-based for support).
std::shared_ptr< HierarchyView > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated HierarchyView instances.
Definition: HierarchyView.hpp:64
ConstModelIterator getModelsEnd() const
Returns a constant iterator pointing one past the last model.
HierarchyView(const Chem::MolecularGraph &molgraph)
Constructs a HierarchyView instance for the molecular graph molgraph.
bool hasModelWithNumber(std::size_t num) const
Tells whether a model with number num exists.
ConstModelIterator end() const
Returns a constant iterator pointing one past the last model (range-based for support).
Data structure for the storage of residues extracted from biological macromolecules.
Definition: ResidueList.hpp:52
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
The namespace of the Chemical Data Processing Library.