18 #ifndef VCSN_ALGEBRA_CONCEPT_FREEMONOID_BASE_HXX
19 # define VCSN_ALGEBRA_CONCEPT_FREEMONOID_BASE_HXX
21 # include <vaucanson/algebra/concept/freemonoid_base.hh>
33 typename FreeMonoidBase<Self>::alphabet_t&
36 return this->
self().alphabet();
43 return this->
self().alphabet();
61 template <
class Self,
typename T>
65 return op_size(this->structure(), this->value());
68 template <
class Self,
typename T>
72 op_in_mirror(this->structure(), this->value());
75 template <
class Self,
typename T>
79 return op_begin(this->structure(), this->value());
82 template <
class Self,
typename T>
86 return op_begin_const(this->structure(), this->value());
89 template <
class Self,
typename T>
93 return op_rbegin(this->structure(), this->value());
96 template <
class Self,
typename T>
100 return op_rbegin_const(this->structure(), this->value());
103 template <
class Self,
typename T>
107 return op_end(this->structure(), this->value());
110 template <
class Self,
typename T>
114 return op_end_const(this->structure(), this->value());
117 template <
class Self,
typename T>
121 return op_rend(this->structure(), this->value());
124 template <
class Self,
typename T>
128 return op_rend_const(this->structure(), this->value());
131 template <
class Self,
typename T>
136 template <
class Self,
typename T>
145 template <
typename S,
typename T>
154 template <
typename S,
typename T>
157 const std::string& s)
162 template<
typename S,
typename T>
163 const std::basic_string<T>&
164 op_convert(
const algebra::FreeMonoidBase<S>& s,
166 const std::basic_string<T>& from_data)
169 for (
typename std::basic_string<T>::const_iterator it = from_data.begin();
170 it != from_data.end();
172 precondition_ (s.alphabet().contains(*it),
173 "The letter " + vcsn::algebra::letter_traits<T>::letter_to_literal(*it) +
174 " is not in the given alphabet");
175 # else // ! VCSN_NDEBUG
177 # endif // ! VCSN_NDEBUG
187 template <
typename S,
typename T>
189 op_parse(
const algebra::FreeMonoidBase<S>&,
191 const std::string& s)
193 static_error(no_op_parse_operator_available);
194 return std::make_pair(
false, 0);
197 template <
typename Self,
typename T>
199 op_in_mirror(
const algebra::FreeMonoidBase<Self>& s, T& v)
203 = op_begin(s.self(), v);
205 for (
typename MetaElement<algebra::FreeMonoidBase<Self>, T>::
206 const_reverse_iterator i = op_rbegin_const(s.self(), new_v);
207 i != op_rend_const(s.self(), new_v);
212 template <
typename Self,
typename T>
214 op_contains(
const algebra::FreeMonoidBase<Self>& s,
const T& v)
216 typedef typename op_begin_traits<Self, T>::const_ret_t const_iterator;
218 for (const_iterator i = op_begin_const(s.self(), v);
219 i != op_end_const(s.self(), v);
221 if (! s.alphabet().contains(*i))
226 template <
typename Self,
typename St,
typename T>
228 op_rout(
const algebra::FreeMonoidBase<Self>& s,
232 return op_rout(s.self(), st, v);
239 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_BASE_HXX