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

# 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, 2005, 2006 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
    00066   };
    00067
    00071   /*-------------------------------.
    00072   | dynamic_traits<FreeMonoid<A> > |
    00073   `-------------------------------*/
    00075   template<typename A>
    00076   struct dynamic_traits<algebra::FreeMonoid<A> >
    00077     : dynamic_traits<algebra::FreeMonoidBase<algebra::FreeMonoid<A> > >
    00078   {
    00080     static const bool           ret = A::dynamic;
    00081   };
    00082
    00083   /*------------------------------.
    00084   | MetaElement<FreeMonoid<A>, T> |
    00085   `------------------------------*/
    00088   template<typename A, typename T>
    00089   struct MetaElement<algebra::FreeMonoid<A>, T>
    00090     : MetaElement<algebra::FreeMonoidBase<algebra::FreeMonoid<A> >, T>
    00091   {};
    00092
    00096   template <class A>
    00097   struct virtual_types<algebra::FreeMonoid<A> >
    00098     : virtual_types<algebra::FreeMonoidBase<algebra::FreeMonoid<A> > >
    00099   {
    00101     typedef algebra::mul_kind semigroup_kind;
    00102
    00103     typedef A           alphabet_t;
    00104   };
    00105
    00112   enum op_choose_max_word_length_t { op_choose_max_word_length = 32 };
    00113
    00114 } // vcsn
    00115
    00116 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
    00117 #  include <vaucanson/algebra/implementation/free_monoid/words.hxx>
    00118 # endif // VCSN_USE_INTERFACE_ONLY
    00119
    00120 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_FREE_MONOID_WORDS_HH