00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2010 by the OpenStructure authors 00005 // 00006 // This library is free software; you can redistribute it and/or modify it under 00007 // the terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 3.0 of the License, or (at your option) 00009 // any later version. 00010 // This library is distributed in the hope that it will be useful, but WITHOUT 00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, Inc., 00017 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 //------------------------------------------------------------------------------ 00019 #ifndef OST_RESIDUE_BASE_HH 00020 #define OST_RESIDUE_BASE_HH 00021 00022 #include <ost/mol/module_config.hh> 00023 #include <ost/mol/residue_prop.hh> 00024 #include <ost/mol/impl/residue_impl_fw.hh> 00025 #include <ost/mol/sec_structure.hh> 00026 #include <ost/mol/handle_type_fw.hh> 00027 #include <ost/mol/chem_class.hh> 00028 00029 #include <ost/generic_property.hh> 00030 #include "property_id.hh" 00031 00032 namespace ost { namespace mol { 00033 00059 class DLLEXPORT_OST_MOL ResidueBase: 00060 public GenericPropContainer<ResidueBase> { 00061 public: 00062 ResidueBase(); 00063 ResidueBase(const impl::ResidueImplPtr& impl); 00064 ResidueBase(const ResidueBase& rhs); 00065 public: 00066 friend class ConstGenericPropContainer<ResidueBase>; 00068 const ResNum& GetNumber() const; 00069 00071 const ResidueKey& GetKey() const; 00072 00074 const String& GetName() const; 00075 00078 String GetQualifiedName() const; 00079 00081 00082 00083 00084 00085 00086 00087 00088 operator bool() const; 00091 bool IsValid() const; 00093 00095 bool IsPeptideLinking() const; 00096 00098 bool IsNucleotideLinking() const; 00099 00100 ChemClass GetChemClass() const; 00101 00102 void SetChemClass(ChemClass cc); 00103 00106 SecStructure GetSecStructure() const; 00107 00111 void SetSecStructure(SecStructure ss); 00112 00117 TorsionHandle GetPhiTorsion() const; 00118 00123 TorsionHandle GetPsiTorsion() const; 00124 00129 TorsionHandle GetOmegaTorsion() const; 00130 char GetOneLetterCode() const; 00131 00132 void SetOneLetterCode(char olc); 00133 00135 String GetStringProperty(Prop::ID prop_id) const; 00136 00138 Real GetFloatProperty(Prop::ID prop_id) const; 00139 00141 int GetIntProperty(Prop::ID prop_id) const; 00142 00143 public: 00144 impl::ResidueImplPtr& Impl(); 00145 00146 const impl::ResidueImplPtr& Impl() const; 00147 protected: 00148 GenericPropContainerImpl* GpImpl(); 00149 00150 const GenericPropContainerImpl* GpImpl() const; 00151 void CheckValidity() const; 00152 private: 00153 impl::ResidueImplPtr impl_; 00154 00155 }; 00156 00157 DLLEXPORT_OST_MOL std::ostream& operator<<(std::ostream& os, 00158 const ResidueBase& residue); 00159 }} // ns 00160 00161 #endif // OST_RESIDUE_BASE_HH 00162
1.5.8