Vaucanson  1.4.1
transpose_view.hh
1 // transpose_view.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, 2008 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_IMPLEMENTATION_TRANSPOSE_VIEW_HH
18 # define VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH
19 
20 # include <vaucanson/automata/implementation/automaton_view.hh>
22 
23 namespace vcsn {
24 
35  template <class T>
36  struct TransposeView : public IdentityView<T>
37  {
38  TransposeView();
39  TransposeView(const T&);
40  TransposeView(T&);
42  };
43 
45 
46  template <class T>
48  {
49  typedef undefined_type type;
50  };
51 
52  template <class S, class T>
53  struct transpose_traits<Element<S, T> >
54  {
55  typedef Element<S, TransposeView<T> > type;
56  };
65  template <class S, class T>
66  Element<S, TransposeView<T> >
67  transpose_view(Element<S, T>&);
68 
69  template <class S, class T>
70  const Element<S, TransposeView<T> >
71  transpose_view(const Element<S, T>&);
74 
75  template <typename T>
76  struct automaton_traits<TransposeView<T> >
77  {
78  typedef typename automaton_traits<T>::label_t label_t;
79  typedef typename automaton_traits<T>::series_set_elt_value_t
80  series_set_elt_value_t;
81  typedef typename automaton_traits<T>::word_value_t word_value_t;
82  typedef typename automaton_traits<T>::semiring_elt_value_t
83  semiring_elt_value_t;
84  typedef typename automaton_traits<T>::letter_t letter_t;
85  typedef typename automaton_traits<T>::tag_t tag_t;
86  typedef typename automaton_traits<T>::states_t states_t;
87 // FIXME: RM? typedef typename automaton_traits<T>::state_data_t state_data_t;
88  typedef typename automaton_traits<T>::state_iterator
89  state_iterator;
90  typedef typename automaton_traits<T>::transitions_t transitions_t;
91 // FIXME: RM? typedef typename automaton_traits<T>::transition_data_t transition_data_t;
92  typedef typename automaton_traits<T>::transition_iterator transition_iterator;
93  typedef typename automaton_traits<T>::initial_t initial_t;
94  typedef typename automaton_traits<T>::initial_iterator
95  initial_iterator;
96  typedef typename automaton_traits<T>::initial_support_t
97  initial_support_t;
98  typedef typename automaton_traits<T>::final_t final_t;
99  typedef typename automaton_traits<T>::final_iterator
100  final_iterator;
101  typedef typename automaton_traits<T>::final_support_t
102  final_support_t;
103  typedef typename automaton_traits<T>::geometry_t geometry_t;
104  typedef typename automaton_traits<T>::geometry_t::coords_t geometry_coords_t;
105 
106 
107  typedef typename automaton_traits<T>::hstate_t hstate_t;
108  typedef typename automaton_traits<T>::htransition_t htransition_t;
109 
110  typedef typename automaton_traits<T>::rdelta_iterator delta_iterator;
111  typedef typename automaton_traits<T>::delta_iterator rdelta_iterator;
112  };
113 
114 #define AutoType(Type) \
115  typename Element<S, TransposeView<T> >::Type
116 
118 
119  template <class S, class T>
120  typename automaton_traits<TransposeView<T> >::initial_support_t
122 
123  template <class S, class T>
124  typename automaton_traits<TransposeView<T> >::final_support_t
125  op_final(const AutomataBase<S>&, const TransposeView<T>&);
126 
127  template <class S, class T>
128  void
130  const typename automaton_traits<T>::hstate_t& state,
131  const AutoType(series_set_elt_t)& s);
132 
133  template <class S, class T>
134  AutoType(series_set_elt_t)
135  op_get_initial(const AutomataBase<S>&,
136  const TransposeView<T>&,
137  const typename automaton_traits<T>::hstate_t&);
138 
139  template <class S, class T>
140  void
141  op_set_final(const AutomataBase<S>&, TransposeView<T>&,
142  const typename automaton_traits<T>::hstate_t& state,
143  const typename Element<S, T>::series_set_elt_t& s);
144 
145  template <class S, class T>
146  typename Element<S, T>::series_set_elt_t
147  op_get_final(const AutomataBase<S>&,
148  const TransposeView<T>&,
149  const typename automaton_traits<T>::hstate_t& state);
150 
151  template <class S, class T>
152  void
154 
155  template <class S, class T>
156  void
157  op_clear_final(const AutomataBase<S>&, TransposeView<T>&);
158 
159  template <class S, class T>
160  typename automaton_traits<T>::hstate_t
161  op_src_of(const AutomataBase<S>&, const TransposeView<T>&,
162  const typename automaton_traits<T>::htransition_t&);
163 
164  template <class S, class T>
165  typename automaton_traits<T>::hstate_t
166  op_dst_of(const AutomataBase<S>&, const TransposeView<T>&,
167  const typename automaton_traits<T>::htransition_t&);
168 
171 } // vcsn
172 
173 # undef AutoType
174 
175 
176 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
177 # include <vaucanson/automata/implementation/transpose_view.hxx>
178 #endif // VCSN_USE_INTERFACE_ONLY
179 
180 
181 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH