words.hh

00001 // words.hh: 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_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HH
00019 
00020 # include <string>
00021 # include <vaucanson/algebra/concept/freemonoid_base.hh>
00022 # include <vaucanson/misc/unique.hh>
00023 
00024 namespace vcsn {
00025 
00026   namespace algebra {
00027   
00031     /*--------------.
00032     | FreeMonoid<A> |
00033     `--------------*/
00035     template<typename A>
00036     struct FreeMonoid
00037       : FreeMonoidBase<FreeMonoid<A> >
00038     {
00039       typedef A alphabets_elt_t;
00040 
00042       FreeMonoid(const A& a);
00043 
00045       FreeMonoid(const FreeMonoid& w);
00046 
00049       A&        alphabet();
00050 
00052       const A&  alphabet() const;
00053 
00054     protected:
00055       A alph_;
00056     };
00057 
00058     template<typename A>
00059     bool operator==(const FreeMonoid<A>& a,
00060                     const FreeMonoid<A>& b);
00061 
00062 
00065   };
00066   
00070   /*-------------------------------.
00071   | dynamic_traits<FreeMonoid<A> > |
00072   `-------------------------------*/
00074   template<typename A>
00075   struct dynamic_traits<algebra::FreeMonoid<A> >
00076     : dynamic_traits<algebra::FreeMonoidBase<algebra::FreeMonoid<A> > >
00077   {
00079     static const bool           ret = A::dynamic;
00080   };
00081 
00082   /*------------------------------.
00083   | MetaElement<FreeMonoid<A>, T> |
00084   `------------------------------*/
00087   template<typename A, typename T>
00088   struct MetaElement<algebra::FreeMonoid<A>, T>
00089     : MetaElement<algebra::FreeMonoidBase<algebra::FreeMonoid<A> >, T>
00090   {};
00091 
00094   template <class A>
00095   struct virtual_types<algebra::FreeMonoid<A> >
00096     : virtual_types<algebra::FreeMonoidBase<algebra::FreeMonoid<A> > >
00097   {
00099     typedef algebra::mul_kind semigroup_kind;
00100 
00101     typedef A           alphabet_t;
00102   };
00103 
00110   enum op_choose_max_word_length_t { op_choose_max_word_length = 32 };
00111 
00112 } // vcsn
00113 
00114 # ifndef VCSN_USE_INTERFACE_ONLY
00115 #  include <vaucanson/algebra/implementation/free_monoid/words.hxx>
00116 # endif // VCSN_USE_INTERFACE_ONLY
00117 
00118 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HH

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