00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_HH
00018 # define VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_HH
00019 
00020 # include <string>
00021 # include <vaucanson/algebra/concept/freemonoid_product_base.hh>
00022 # include <vaucanson/misc/unique.hh>
00023 
00024 namespace vcsn {
00025 
00026   namespace algebra {
00027   
00031     
00032 
00033 
00034 
00036     template<class F, class S>
00037     struct FreeMonoidProduct
00038       : FreeMonoidProductBase< FreeMonoidProduct<F, S> >
00039     {
00040       typedef F                 first_monoid_t;
00041       typedef S                 second_monoid_t;
00042 
00044       FreeMonoidProduct(const F& a, const S& b);
00045 
00047       FreeMonoidProduct(const FreeMonoidProduct& w);
00048 
00052       first_monoid_t&           first_monoid();
00053 
00054       const first_monoid_t&     first_monoid() const;
00055 
00056       second_monoid_t&          second_monoid();
00057 
00058       const second_monoid_t&    second_monoid() const;
00059 
00060     protected:
00061       first_monoid_t    first_monoid_;
00062       second_monoid_t   second_monoid_;
00063     };
00064 
00065     template<class F, class S>
00066     bool operator==(const FreeMonoidProduct<F, S>& m1,
00067                     const FreeMonoidProduct<F, S>& m2);
00068 
00072   } 
00073   
00077   
00078 
00079 
00081   template<class F, class S>
00082   struct dynamic_traits<algebra::FreeMonoidProduct<F, S> >
00083     : dynamic_traits<algebra::FreeMonoidProductBase<algebra::FreeMonoidProduct<F, S> > >
00084   {
00086     static const bool
00087     ret = dynamic_traits<F>::ret or dynamic_traits<S>::ret;
00088   };
00089 
00090   
00091 
00092 
00094   template<class F, class S>
00095   struct representation_traits<algebra::FreeMonoidProduct<F, S> >
00096     : representation_traits<algebra::FreeMonoidProductBase<algebra::FreeMonoidProduct<F, S> > >
00097   { };
00098 
00099   
00100 
00101 
00104   template<class F, class S, typename T>
00105   struct MetaElement<algebra::FreeMonoidProduct<F, S>, T>
00106     : MetaElement<algebra::FreeMonoidProductBase<algebra::FreeMonoidProduct<F, S> >, T>
00107   {
00108     typedef F   first_monoid_t;
00109     typedef S   second_monoid_t;
00110   };
00111 
00116   template <class F, class S>
00117   struct virtual_types<algebra::FreeMonoidProduct<F, S> >
00118     : virtual_types<algebra::FreeMonoidProductBase<algebra::FreeMonoidProduct<F, S> > >
00119   {
00121     typedef algebra::mul_kind semigroup_kind;
00122 
00123     typedef F           first_monoid_t;
00124     typedef S           second_monoid_t;
00125   };
00126 
00127 } 
00128 
00129 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00130 #  include <vaucanson/algebra/concept/freemonoid_product.hxx>
00131 # endif // VCSN_USE_INTERFACE_ONLY
00132 
00133 
00134 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_HH