OpenStructure
Loading...
Searching...
No Matches
chain_base.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19#ifndef OST_CHAIN_BASE_HH
20#define OST_CHAIN_BASE_HH
21
24
25#include <ost/mol/chain_type.hh>
27
28namespace ost { namespace mol {
29
40 public GenericPropContainer<ChainBase> {
41
42public: // constructors
45public:
46
48
49
55 operator bool() const { return this->IsValid(); }
58 bool IsValid() const;
61 String GetName() const;
62
67
72
73 const impl::ChainImplPtr& Impl() const {
74 return impl_;
75 }
76
81 bool IsPolymer() const;
82
84 bool IsPolysaccharide() const;
85
87 bool IsOligosaccharide() const;
88
90 bool IsPolypeptide() const;
91
93 bool IsPolynucleotide() const;
94
96 return impl_;
97 }
98protected:
100
102
103 void CheckValidity() const;
104private:
105 impl::ChainImplPtr impl_;
106};
107
108DLLEXPORT_OST_MOL std::ostream& operator<<(std::ostream& os,
109 const ChainBase& chain);
110}} // ns
111
112#endif // OST_CHAIN_BASE_HH
113
base class for the handler classes
base class for the implementation
base class for ChainHandle and ChainView
Definition chain_base.hh:40
impl::ChainImplPtr & Impl()
Definition chain_base.hh:95
bool IsPolypeptide() const
whether the chain is a polypeptide
bool IsPolymer() const
whether the chain is a polymer
const impl::ChainImplPtr & Impl() const
Definition chain_base.hh:73
String GetName() const
ChainBase(const impl::ChainImplPtr &impl)
bool IsPolynucleotide() const
whether the chain is a polynucleotide
void CheckValidity() const
String GetDescription() const
Get information about a chain.
ChainType GetType() const
Get the type of a chain.
bool IsOligosaccharide() const
whether the chain is an oligsaccharide (branched mmCIF entity)
GenericPropContainerImpl * GpImpl()
const GenericPropContainerImpl * GpImpl() const
bool IsPolysaccharide() const
whether the chain is a polysaccharide
std::string String
Definition base.hh:54
#define DLLEXPORT_OST_MOL
boost::shared_ptr< ChainImpl > ChainImplPtr
DLLEXPORT_OST_MOL std::ostream & operator<<(std::ostream &os, const AtomBase &atom)
Definition base.dox:1