00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_HANDLERS_HXX
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_HANDLERS_HXX
00019 
00020 # include <vaucanson/misc/contract.hh>
00021 # include <vaucanson/automata/concept/handlers.hh>
00022 # include <vaucanson/automata/implementation/bmig/bmig_handlers.hh>
00023 
00024 namespace vcsn
00025 {
00026 
00027   inline
00028   handler<state_h, boost::shared_ptr<std::size_t> >::handler()
00029   {
00030     static boost::shared_ptr<std::size_t> uint_max(new std::size_t(UINT_MAX));
00031     v_ = uint_max;
00032   }
00033 
00034   inline
00035   handler<state_h, boost::shared_ptr<std::size_t> >::handler(boost::shared_ptr<std::size_t> h) : v_(h)
00036   {}
00037 
00038   inline
00039   handler<state_h, boost::shared_ptr<std::size_t> >::handler(const handler<state_h, boost::shared_ptr<std::size_t> >& h) : v_(h.v_)
00040   {}
00041 
00042   inline
00043   handler<state_h, boost::shared_ptr<std::size_t> >&
00044   handler<state_h, boost::shared_ptr<std::size_t> >::operator=(const handler<state_h, boost::shared_ptr<std::size_t> >& h)
00045   {
00046     v_ = h.v_;
00047     return *this;
00048   }
00049 
00050   inline
00051   boost::shared_ptr<std::size_t>
00052   handler<state_h, boost::shared_ptr<std::size_t> >::value() const
00053   {
00054     return v_;
00055   }
00056 
00057   inline
00058   handler<state_h, boost::shared_ptr<std::size_t> >::operator unsigned() const
00059   {
00060     return *v_;
00061   }
00062 
00063   inline
00064   bool
00065   handler<state_h, boost::shared_ptr<std::size_t> >::is_valid() const
00066   {
00067     return *v_ != UINT_MAX;
00068   }
00069 
00070 } 
00071 #endif
00072