00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
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 } 
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