words.hxx

00001 // words.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 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_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HXX
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HXX
00019 
00020 # include <vaucanson/algebra/implementation/free_monoid/words.hh>
00021 
00022 namespace vcsn {
00023 
00024   namespace algebra {
00025 
00026     /*---------.
00027     | Words<A> |
00028     `---------*/
00029 
00030     template <class A>
00031     FreeMonoid<A>::FreeMonoid(const A& a) : alph_(a)
00032     {}
00033 
00034     template <class A>
00035     FreeMonoid<A>::FreeMonoid(const FreeMonoid& w) :
00036       FreeMonoidBase<FreeMonoid<A> >(w),
00037       alph_(w.alph_)
00038     {}
00039 
00040     template <class A>
00041     A& FreeMonoid<A>::alphabet()
00042     {
00043       return alph_;
00044     }
00045 
00046     template <class A>
00047     const A& FreeMonoid<A>::alphabet() const
00048     {
00049       return alph_;
00050     }
00051 
00052     template<typename A>
00053     bool operator==(const FreeMonoid<A>& a,
00054                     const FreeMonoid<A>& b)
00055     {
00056       return a.alphabet() == b.alphabet();
00057     }
00058 
00059   } // algebra
00060 
00061 } // vcsn
00062 
00063 
00064 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HXX

Generated on Fri Jul 28 12:18:56 2006 for Vaucanson by  doxygen 1.4.6