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

- File List
- File Members

# listg_handlers.hxx

    00001 // listg_handlers.hxx: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 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_LISTG_LISTG_HANDLERS_HXX
    00018 # define VCSN_AUTOMATA_IMPLEMENTATION_LISTG_LISTG_HANDLERS_HXX
    00019
    00020 # include <climits>
    00021 # include <vaucanson/misc/contract.hh>
    00022 # include <vaucanson/automata/implementation/listg/listg_handlers.hh>
    00023
    00024 namespace vcsn
    00025 {
    00026
    00027   template<typename Tag>
    00028   handler<Tag, unsigned>::handler() : v_(UINT_MAX)
    00029   {}
    00030
    00031   template<typename Tag>
    00032   handler<Tag, unsigned>::handler(unsigned h) : v_(h)
    00033   {}
    00034
    00035   template<typename Tag>
    00036   handler<Tag, unsigned>::handler(const handler<Tag, unsigned>& h) : v_(h.v_)
    00037   {}
    00038
    00039   template<typename Tag>
    00040   handler<Tag, unsigned>&
    00041   handler<Tag, unsigned>::operator=(const handler<Tag, unsigned>& h)
    00042   {
    00043     v_ = h.v_;
    00044     return *this;
    00045   }
    00046
    00047   template<typename Tag>
    00048   unsigned handler<Tag, unsigned>::value() const
    00049   {
    00050     return v_;
    00051   }
    00052
    00053   template<typename Tag>
    00054   handler<Tag, unsigned>::operator unsigned() const
    00055   {
    00056     return v_;
    00057   }
    00058
    00059   template<typename Tag>
    00060   bool
    00061   handler<Tag, unsigned>::is_valid() const
    00062   {
    00063     return v_ != UINT_MAX;
    00064   }
    00065
    00066 } // vcsn
    00067
    00068 #endif
    00069