bmig_handlers.hh

00001 // bmig_handlers.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2007, 2008 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_HANDLERS_HH
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_HANDLERS_HH
00019 
00020 # include <vaucanson/automata/concept/handlers.hh>
00021 # include <boost/multi_index_container.hpp>
00022 # include <boost/multi_index/hashed_index.hpp>
00023 # include <boost/shared_ptr.hpp>
00024 
00025 namespace vcsn
00026 {
00027 
00028   template <>
00029   class handler<state_h, boost::shared_ptr<std::size_t> >
00030   {
00031     public:
00032       typedef state_h kind;
00033       typedef handler<state_h, boost::shared_ptr<std::size_t> > self_t;
00034 
00035       handler();
00036 
00037       explicit handler(boost::shared_ptr<std::size_t> h);
00038 
00039       handler(const self_t& h);
00040 
00041       self_t& operator=(const self_t& h);
00042 
00043       boost::shared_ptr<std::size_t>  value() const;
00044 
00045       operator unsigned() const;
00046 
00047       bool is_valid() const;
00048 
00049     protected:
00050       boost::shared_ptr<std::size_t>  v_;
00051   };
00052 
00053   using boost::multi_index::detail::hashed_index_iterator;
00054 
00055   template<typename T, typename U, typename V>
00056   bool operator==(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00057                   const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00058   template<typename T, typename U, typename V>
00059   bool operator!=(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00060                   const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00061   template<typename T, typename U, typename V>
00062   bool operator<(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00063                  const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00064   template<typename T, typename U, typename V>
00065   bool operator>(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00066                  const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00067   template<typename T, typename U, typename V>
00068   bool operator<=(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00069                   const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00070   template<typename T, typename U, typename V>
00071   bool operator>=(const handler<transition_h, hashed_index_iterator<T, U, V> >& h1,
00072                   const handler<transition_h, hashed_index_iterator<T, U, V> >& h2);
00073 
00074   template<>
00075   bool operator==(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00076                   const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00077   template<>
00078   bool operator!=(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00079                   const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00080   template<>
00081   bool operator<(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00082                  const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00083   template<>
00084   bool operator>(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00085                  const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00086   template<>
00087   bool operator<=(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00088                   const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00089   template<>
00090   bool operator>=(const handler<state_h, boost::shared_ptr<std::size_t> >& h1,
00091                   const handler<state_h, boost::shared_ptr<std::size_t> >& h2);
00092 
00093 
00094 } // vcsn
00095 
00096 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00097 # include <vaucanson/automata/implementation/bmig/bmig_handlers.hxx>
00098 # include <vaucanson/automata/implementation/bmig/bmig_handlers_op.hxx>
00099 #endif // VCSN_USE_INTERFACE_ONLY
00100 
00101 #endif
00102 

Generated on Thu Oct 9 20:22:34 2008 for Vaucanson by  doxygen 1.5.1