- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# bmig_handlers.hxx

    00001 // bmig_handlers.hxx: 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_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 } // vcsn
    00071 #endif
    00072