00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HH
00018 # define VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HH
00019
00020 # include <vaucanson/algebra/concept/alphabets_base.hh>
00021 # include <vaucanson/algebra/concept/monoid_base.hh>
00022 # include <string>
00023 # include <list>
00024
00025 namespace vcsn {
00026
00027 namespace algebra {
00028
00032
00033
00034
00035
00044 template<class Self>
00045 struct FreeMonoidProductBase
00046 : MonoidBase<Self>
00047 {
00049 typedef typename virtual_types<Self>::first_monoid_t first_monoid_t;
00050
00052 typedef typename virtual_types<Self>::second_monoid_t second_monoid_t;
00053
00054
00055 typedef undefined_type alphabet_t;
00056 typedef undefined_type letter_t;
00057
00059 first_monoid_t& first_monoid();
00060
00062 const first_monoid_t& first_monoid() const;
00063
00065 second_monoid_t& second_monoid();
00066
00068 const second_monoid_t& second_monoid() const;
00069
00070 protected:
00072 FreeMonoidProductBase();
00073
00075 FreeMonoidProductBase(const FreeMonoidProductBase& m);
00076 };
00077
00081 }
00082
00086
00087
00088
00089
00090 template<class Self>
00091 struct dynamic_traits<algebra::FreeMonoidProductBase<Self> >
00092 : dynamic_traits<algebra::MonoidBase<Self> >
00093 { };
00094
00095
00096
00097
00098
00099 template<class Self>
00100 struct representation_traits<algebra::FreeMonoidProductBase<Self> >
00101 {
00102 static const std::string default_eps_eps();
00103 };
00104
00105
00106
00107
00108
00109 template<typename S>
00110 struct virtual_types<algebra::FreeMonoidProductBase<S> >
00111 : virtual_types<algebra::MonoidBase<S> >
00112 {
00113 typedef undefined_type first_monoid_t;
00114 typedef undefined_type second_monoid_t;
00115 };
00116
00117
00118
00119
00120
00121
00123 template<class Self, typename T>
00124 struct MetaElement<algebra::FreeMonoidProductBase<Self>, T>
00125 : MetaElement<algebra::MonoidBase<Self>, T>
00126 {
00127 typedef typename virtual_types<Self>::first_monoid_t first_monoid_t;
00128 typedef typename virtual_types<Self>::second_monoid_t second_monoid_t;
00129
00130 typedef typename T::first_type first_monoid_elt_value_t;
00131 typedef typename T::second_type second_monoid_elt_value_t;
00132
00133 typedef Element<first_monoid_t, first_monoid_elt_value_t>
00134 first_monoid_elt_t;
00135 typedef Element<second_monoid_t, second_monoid_elt_value_t>
00136 second_monoid_elt_t;
00137
00139 first_monoid_elt_t& first();
00140
00142 const first_monoid_elt_t& first() const;
00143
00145 second_monoid_elt_t& second();
00146
00148 const second_monoid_elt_t& second() const;
00149
00151 void mirror();
00152
00154 template <class Ftor>
00155 typename Ftor::result_type length(Ftor f);
00156
00157 protected:
00159 MetaElement();
00160
00162 MetaElement(const MetaElement& other);
00163 };
00164
00168
00169 namespace algebra
00170 {
00171 template<typename Self, typename St, typename T>
00172 St&
00173 op_rout(const FreeMonoidProductBase<Self>& s, St& st, const T& v);
00174
00175 }
00176
00177 }
00178
00179 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00180 # include <vaucanson/algebra/concept/freemonoid_product_base.hxx>
00181 # endif // VCSN_USE_INTERFACE_ONLY
00182
00183 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_BASE_HH