Vaucanson  1.4.1
syntactic_decorator.hh
Go to the documentation of this file.
1 // syntactic_decorator.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 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_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
18 # define VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
19 
21 
29 namespace vcsn {
30 
33  /*-------------------.
34  | SyntacticDecorator |
35  `-------------------*/
36 
43  template<typename S, typename T>
45  {
47  static const bool dynamic_value = true;
48 
50  const S& structure() const;
51 
53 
54  T& value();
55  const T& value() const;
57 
59  template<typename OtherS, typename U>
61 
64  template<typename U>
65  Element<S, T>& operator+=(const U& other);
66 
68  template<typename OtherS, typename U>
70 
73  template<typename U>
74  Element<S, T>& operator-=(const U& other);
75 
77  template<typename OtherS, typename U>
79 
82  template<typename U>
83  Element<S, T>& operator/=(const U& other);
84 
86  template<typename OtherS, typename U>
88 
91  template<typename U>
92  Element<S, T>& operator*=(const U& other);
93 
95  template<typename OtherS, typename U>
97 
100  template<typename U>
101  Element<S, T>& operator%=(const U& other);
102 
105 
108 
111 
114 
117  template<typename U>
119 
121 
128  Element<S, T>& self();
129  const Element<S, T>& self() const;
131 
132  protected:
133 
135 
139  };
140 
143 } // vcsn
144 
145 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
146 # include <vaucanson/design_pattern/syntactic_decorator.hxx>
147 # endif // VCSN_USE_INTERFACE_ONLY
148 
149 #endif // ! VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH