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 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   | representation_traits<FreeMonoidProductBase<Self> |
00072   `--------------------------------------------------*/
00073 
00074   template<class Self>
00075   const std::string
00076   representation_traits<algebra::FreeMonoidProductBase<Self> >::
00077   default_eps_eps()
00078   {
00079     return "1";
00080   };
00081 
00082   /*--------------------------------------------.
00083   | MetaElement<FreeMonoidProductBase<Self>, T> |
00084   `--------------------------------------------*/
00085   template <class Self, typename T>
00086   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::MetaElement() :
00087     MetaElement<algebra::MonoidBase<Self>, T>()
00088   {}
00089 
00090   template <class Self, typename T>
00091   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::
00092   MetaElement(const MetaElement& o)  :
00093     MetaElement<algebra::MonoidBase<Self>, T>(o)
00094   {}
00095 
00096   template <class Self, typename T>
00097   typename
00098   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first_monoid_elt_t&
00099   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first()
00100   {
00101     return op_first(this->structure(), this->value());
00102   }
00103 
00104   template <class Self, typename T>
00105   const
00106   typename
00107   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first_monoid_elt_t&
00108   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::first() const
00109   {
00110     return op_first(this->structure(), this->value());
00111   }
00112 
00113   template <class Self, typename T>
00114   typename
00115   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second_monoid_elt_t&
00116   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second()
00117   {
00118     return op_second(this->structure(), this->value());
00119   }
00120 
00121   template <class Self, typename T>
00122   const
00123   typename
00124   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second_monoid_elt_t&
00125   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::second() const
00126   {
00127     return op_second(this->structure(), this->value());
00128   }
00129 
00130   template <class Self, typename T>
00131   void
00132   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::mirror()
00133   {
00134     op_in_mirror(this->structure(), this->value());
00135   }
00136 
00137   template <class Self, typename T>
00138   template <class Ftor>
00139   typename Ftor::result_type
00140   MetaElement<algebra::FreeMonoidProductBase<Self>, T>::length(Ftor f)
00141   {
00142     return op_length(this->structure(), this->value(), f);
00143   }
00144 
00145 } // vcsn
00146 
00147 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HXX

Generated on Thu Oct 9 20:22:35 2008 for Vaucanson by  doxygen 1.5.1