Vaucanson  1.4.1
transducer_ops.hh
1 // transducer_ops.hh: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_AUTOMATA_CONCEPT_TRANSDUCER_OPS_HH
18 # define VCSN_AUTOMATA_CONCEPT_TRANSDUCER_OPS_HH
19 
20 # include <vaucanson/design_pattern/design_pattern.hh>
21 # include <vaucanson/automata/concept/transducer_base.hh>
22 
23 namespace vcsn {
24 
25 #define AutoType(Type) \
26  typename Element<S, T>::Type
27 
28  template <class S, class T>
29  typename Element<S, T>::input_monoid_elt_t
30  op_input_of(const TransducerBase<S>& s,
31  const T& v,
32  typename automaton_traits<T>::htransition_t e);
33 
34  template <class S, class T>
35  typename Element<S, T>::output_series_set_elt_t
36  op_output_of(const TransducerBase<S>& s,
37  const T& v,
38  typename automaton_traits<T>::htransition_t e);
39 
40  template <class S, class T>
41  typename automaton_traits<T>::htransition_t
42  op_add_io_transition(const TransducerBase<S>& s,
43  T& v,
44  typename automaton_traits<T>::hstate_t from,
45  typename automaton_traits<T>::hstate_t to,
46  AutoType(input_letter_t) i,
47  AutoType(output_letter_t) o,
48  AutoType(output_semiring_elt_t) w);
49 
50  template <class S, class T>
51  typename automaton_traits<T>::htransition_t
52  op_add_io_transition(const TransducerBase<S>& s,
53  T& v,
54  typename automaton_traits<T>::hstate_t from,
55  typename automaton_traits<T>::hstate_t to,
56  AutoType(input_monoid_elt_t) input_w,
57  AutoType(output_monoid_elt_t) output_w,
58  AutoType(output_semiring_elt_t) w);
59 
60  template <class S, class T>
61  typename automaton_traits<T>::htransition_t
62  op_add_i_transition(const TransducerBase<S>& s,
63  T& v,
64  typename automaton_traits<T>::hstate_t from,
65  typename automaton_traits<T>::hstate_t to,
66  AutoType(input_letter_t) i,
67  AutoType(output_semiring_elt_t) w);
68 
69  template <class S, class T>
70  typename automaton_traits<T>::htransition_t
71  op_add_o_transition(const TransducerBase<S>& s,
72  T& v,
73  typename automaton_traits<T>::hstate_t from,
74  typename automaton_traits<T>::hstate_t to,
75  AutoType(input_letter_t) o,
76  AutoType(output_semiring_elt_t) w);
77 
78  template <class S, class T>
79  static AutoType(series_set_elt_t)
80  make_series(const TransducerBase<S>& s,
81  AutoType(output_monoid_elt_value_t) o);
82 
83  template <class S, class T>
84  void
85  op_set_o_final(const TransducerBase<S>& s,
86  T& v,
87  typename automaton_traits<T>::hstate_t final,
88  AutoType(output_monoid_elt_value_t) o);
89 
90  template <class S, class T>
91  void
92  op_set_o_initial(const TransducerBase<S>& s,
93  T& v,
94  typename automaton_traits<T>::hstate_t initial,
95  AutoType(output_monoid_elt_value_t) o);
96 } // vcsn
97 
98 
99 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
100 # include <vaucanson/automata/concept/transducer_ops.hxx>
101 #endif // VCSN_USE_INTERFACE_ONLY
102 
103 
104 #endif // ! VCSN_AUTOMATA_CONCEPT_TRANSDUCER_OPS_HH