00001 // -*- mode: c++; -*- 00002 // 00003 //The Biomolecule Toolkit (BTK) is a C++ library for use in the 00004 //modeling, analysis, and design of biological macromolecules. 00005 //Copyright (C) 2004, Christopher Saunders <ctsa@users.sourceforge.net> 00006 // 00007 //This program is free software; you can redistribute it and/or modify 00008 //it under the terms of the GNU Lesser General Public License as published 00009 //by the Free Software Foundation; either version 2.1 of the License, or (at 00010 //your option) any later version. 00011 // 00012 //This program is distributed in the hope that it will be useful, but 00013 //WITHOUT ANY WARRANTY; without even the implied warranty of 00014 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 //Lesser General Public License for more details. 00016 // 00017 //You should have received a copy of the GNU Lesser General Public License 00018 //along with this program; if not, write to the Free Software Foundation, 00019 //Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 // 00021 00022 00023 #ifndef BTK_PEPTIDE_HEAVY_ATOM_FAMILY_PATTERN_H 00024 #define BTK_PEPTIDE_HEAVY_ATOM_FAMILY_PATTERN_H 00025 00026 00027 #include "peptide_bb_family_pattern.h" 00028 00029 00030 namespace BTK{ 00031 00033 // singleton data class defining the pattern of a 00034 // all heavy-atom peptide 00035 // 00036 class PeptideHeavyAtomFamilyPattern : public PeptideBBFamilyPattern { 00037 typedef PeptideBBFamilyPattern base_type; 00038 typedef PeptideHeavyAtomFamilyPattern self_type; 00039 public: 00040 typedef base_type::types types; 00041 00042 // implement singleton concept 00043 static const self_type& instance() 00044 { 00045 static const self_type _instance; 00046 return _instance; 00047 } 00048 00049 protected: 00050 // implement singleton concept by making ctor protected: 00051 PeptideHeavyAtomFamilyPattern(); 00052 00053 virtual types::family_pattern_t& family_pattern() { 00054 return _family_pattern; 00055 } 00056 virtual const types::family_pattern_t& family_pattern() const { 00057 return _family_pattern; 00058 } 00059 00060 private: 00061 // implement singleton concept by making these private: 00062 PeptideHeavyAtomFamilyPattern(const self_type&); 00063 self_type& operator=(const self_type&); 00064 00065 types::family_pattern_t _family_pattern; 00066 }; 00067 00068 00069 } // namespace BTK 00070 00071 #endif
1.3.6