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

- File List
- File Members

# freemonoid_product_base.hxx

    00001 // freemonoid_product_base.hxx: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2004, 2005, 2006, 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_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HXX
    00018 # define VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HXX
    00019
    00020 # include <vaucanson/algebra/concept/freemonoid_product_base.hh>
    00021
    00022 namespace vcsn {
    00023
    00024   namespace algebra {
    00025
    00026     /*----------------------------.
    00027     | FreeMonoidProductBase<Self> |
    00028     `----------------------------*/
    00029
    00030     template <class Self>
    00031     typename FreeMonoidProductBase<Self>::first_monoid_t&
    00032     FreeMonoidProductBase<Self>::first_monoid()
    00033     {
    00034       return this->self().first_monoid();
    00035     }
    00036
    00037     template <class Self>
    00038     const typename FreeMonoidProductBase<Self>::first_monoid_t&
    00039     FreeMonoidProductBase<Self>::first_monoid() const
    00040     {
    00041       return this->self().first_monoid();
    00042     }
    00043
    00044     template <class Self>
    00045     typename FreeMonoidProductBase<Self>::second_monoid_t&
    00046     FreeMonoidProductBase<Self>::second_monoid()
    00047     {
    00048       return this->self().second_monoid();
    00049     }
    00050
    00051     template <class Self>
    00052     const typename FreeMonoidProductBase<Self>::second_monoid_t&
    00053     FreeMonoidProductBase<Self>::second_monoid() const
    00054     {
    00055       return this->self().second_monoid();
    00056     }
    00057
    00058     template <class Self>
    00059     FreeMonoidProductBase<Self>::FreeMonoidProductBase()
    00060     {}
    00061
    00062     template <class Self>
    00063     FreeMonoidProductBase<Self>::
    00064     FreeMonoidProductBase(const FreeMonoidProductBase& m) :
    00065       MonoidBase<Self>(m)
    00066     {}
    00067
    00068   } // ! algebra
    00069
    00070   /*--------------------------------------------.
    00071   | MetaElement<FreeMonoidProductBase<Self>, T> |
    00072   `--------------------------------------------*/
    00073   template <class Self, typename T>
    00074   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::MetaElement() :
    00075     MetaElement<algebra::MonoidBase<Self>, T>()
    00076   {}
    00077
    00078   template <class Self, typename T>
    00079   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::
    00080   MetaElement(const MetaElement& o)  :
    00081     MetaElement<algebra::MonoidBase<Self>, T>(o)
    00082   {}
    00083
    00084   template <class Self, typename T>
    00085   typename
    00086   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first_monoid_elt_t&
    00087   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first()
    00088   {
    00089     return op_first(this->structure(), this->value());
    00090   }
    00091
    00092   template <class Self, typename T>
    00093   const
    00094   typename
    00095   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first_monoid_elt_t&
    00096   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first() const
    00097   {
    00098     return op_first(this->structure(), this->value());
    00099   }
    00100
    00101   template <class Self, typename T>
    00102   typename
    00103   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second_monoid_elt_t&
    00104   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second()
    00105   {
    00106     return op_second(this->structure(), this->value());
    00107   }
    00108
    00109   template <class Self, typename T>
    00110   const
    00111   typename
    00112   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second_monoid_elt_t&
    00113   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second() const
    00114   {
    00115     return op_second(this->structure(), this->value());
    00116   }
    00117
    00118   template <class Self, typename T>
    00119   void
    00120   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::mirror()
    00121   {
    00122     op_in_mirror(this->structure(), this->value());
    00123   }
    00124
    00125   template <class Self, typename T>
    00126   template <class Ftor>
    00127   typename Ftor::result_type
    00128   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::length(Ftor f)
    00129   {
    00130     return op_length(this->structure(), this->value(), f);
    00131   }
    00132
    00133   namespace algebra
    00134   {
    00135     template <typename Self, typename St, typename T>
    00136     St&
    00137     op_rout(const FreeMonoidProductBase<Self>& s,
    00138             St& st,
    00139             const T& v)
    00140     {
    00141       return op_rout(s.self(), st, v);
    00142     }
    00143
    00144   } // ! algebra
    00145
    00146 } // ! vcsn
    00147
    00148 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HXX