18 #ifndef VCSN_MISC_HASH_HH_ 
   19 # define VCSN_MISC_HASH_HH_ 
   22 # include <vaucanson/algebra/implementation/series/polynoms.hh> 
   23 # include <vaucanson/algebra/implementation/series/rat/exp.hh> 
   24 # include <vaucanson/automata/concept/handlers.hh> 
   25 # include <boost/functional/hash/hash.hpp> 
   26 # include <boost/shared_ptr.hpp> 
   36     struct hash_label<char>
 
   38       std::size_t operator() (
const char) 
const;
 
   42     struct hash_label<int>
 
   44       std::size_t operator() (
const int) 
const;
 
   47     template <
typename U, 
typename V>
 
   48     struct hash_label<std::pair<U, V> >
 
   50       std::size_t operator() (
const std::pair<U, V>&) 
const;
 
   53     template <
typename Word, 
typename Weight>
 
   54     struct hash_label<algebra::polynom<Word, Weight> >
 
   56       std::size_t operator() (
const algebra::polynom<Word, Weight>& l) 
const;
 
   59     template <
typename Weight, 
typename T, 
typename U>
 
   60     struct hash_label<algebra::polynom<std::pair<T, U>, Weight> >
 
   62       std::size_t operator() (
const algebra::polynom<std::pair<T, U>, Weight>& l) 
const;
 
   65     template <
typename Word, 
typename Word2, 
typename WeightT>
 
   66     struct hash_label<algebra::polynom<Word, rat::exp<Word2, WeightT> > >
 
   68       std::size_t operator() (
const algebra::polynom<Word, rat::exp<Word2, WeightT> >& l) 
const;
 
   69       std::size_t operator() (
const rat::exp<Word2, WeightT>& l) 
const;
 
   73     template <
typename Word, 
typename LetterT, 
typename WeightT>
 
   74     struct hash_label<algebra::polynom<Word, rat::exp<LetterT, WeightT> > >
 
   76       std::size_t operator() (
const algebra::polynom<Word, rat::exp<LetterT, WeightT> >& l) 
const;
 
   87     template <
typename Word, 
typename Weight>
 
   88     struct hash_label<rat::exp<Word, Weight> >
 
   90       std::size_t operator() (
const rat::exp<Word, Weight>& l) 
const;
 
   96     template <
typename Kind, 
typename Type>
 
   97     struct hash_handler<handler<Kind, Type> >
 
   99       std::size_t operator() (
const handler<Kind, Type>& h) 
const;
 
  103     struct hash_handler<char>
 
  105       std::size_t operator() (
const char h) 
const;
 
  108     struct hash_state_handler
 
  110       inline std::size_t operator() (
const handler<state_h, std::size_t*>& h)
 const 
  112         return ::boost::hash_value (reinterpret_cast<std::size_t>(h.value()));
 
  115       inline std::size_t operator() (
const boost::shared_ptr<std::size_t>& h)
 const 
  117         return ::boost::hash_value (reinterpret_cast<std::size_t>(h.get()));
 
  120       inline std::size_t operator() (
const std::size_t* h)
 const 
  122         return ::boost::hash_value (reinterpret_cast<std::size_t>(h));
 
  129 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB 
  130 #  include <vaucanson/misc/hash.hxx> 
  131 # endif // ! VCSN_USE_INTERFACE_ONLY || VCSN_USE_LIB 
  133 #endif // ! VCSN_MISC_HASH_HH_ //