atom_iterator_concept.hpp

Go to the documentation of this file.
00001 // -*- mode: c++; indent-tabs-mode: nil; -*-
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) 2006, Tim Robertson (kid50@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 
00023 
00024 #ifndef BTK_CONCEPTS_ATOM_ITERATOR_CONCEPT_HPP
00025 #define BTK_CONCEPTS_ATOM_ITERATOR_CONCEPT_HPP
00026 
00058 
00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00060 
00061 #include <iterator>
00062 #include <boost/concept_check.hpp>
00063 
00064 #include <btk/core/concepts/atom_concept.hpp>
00065 
00066 namespace BTK {
00067 namespace CONCEPTS {
00068 
00069 template <class T>
00070 struct AtomIteratorConcept
00071 {
00072   typedef typename std::iterator_traits<T>::value_type value_type;
00073 
00074   void constraints() {
00075     boost::function_requires<boost::BidirectionalIteratorConcept<T> >();
00076     boost::function_requires<AtomConcept<value_type> >();
00077   }
00078 };
00079 
00080 template <class T>
00081 struct MutableAtomIteratorConcept
00082 {
00083   void constraints() {
00084     boost::function_requires<AtomIteratorConcept<T> >();
00085     boost::function_requires<boost::Mutable_BidirectionalIteratorConcept<T> >();
00086   }
00087 };
00088 
00089 } // namespace CONCEPTS
00090 } // namespace BTK
00091 
00092 #endif //DOXYGEN_SHOULD_SKIP_THIS
00093 
00094 #endif // BTK_CONCEPTS_ATOM_ITERATOR_CONCEPT_HPP

Generated on Sun Jul 15 20:46:24 2007 for BTK Core by  doxygen 1.5.1