00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
00018 # define VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
00019
00020 # include <vaucanson/design_pattern/predecls.hh>
00021
00029 namespace vcsn {
00030
00033
00034
00035
00036
00043 template<typename S, typename T>
00044 struct SyntacticDecorator
00045 {
00047 static const bool dynamic_value = true;
00048
00050 const S& structure() const;
00051
00053
00054 T& value();
00055 const T& value() const;
00057
00059 template<typename OtherS, typename U>
00060 Element<S, T>& operator+=(const Element<OtherS, U>& other);
00061
00064 template<typename U>
00065 Element<S, T>& operator+=(const U& other);
00066
00068 template<typename OtherS, typename U>
00069 Element<S, T>& operator-=(const Element<OtherS, U>& other);
00070
00073 template<typename U>
00074 Element<S, T>& operator-=(const U& other);
00075
00077 template<typename OtherS, typename U>
00078 Element<S, T>& operator/=(const Element<OtherS, U>& other);
00079
00082 template<typename U>
00083 Element<S, T>& operator/=(const U& other);
00084
00086 template<typename OtherS, typename U>
00087 Element<S, T>& operator*=(const Element<OtherS, U>& other);
00088
00091 template<typename U>
00092 Element<S, T>& operator*=(const U& other);
00093
00095 template<typename OtherS, typename U>
00096 Element<S, T>& operator%=(const Element<OtherS, U>& other);
00097
00100 template<typename U>
00101 Element<S, T>& operator%=(const U& other);
00102
00104 Element<S, T>& operator++();
00105
00107 Element<S, T> operator++(int);
00108
00110 Element<S, T>& operator--();
00111
00113 Element<S, T> operator--(int);
00114
00117 template<typename U>
00118 Element<S, T>& swap(Element<S, U>& other);
00119
00121
00128 Element<S, T>& self();
00129 const Element<S, T>& self() const;
00131
00132 protected:
00133
00135
00136 SyntacticDecorator();
00137 SyntacticDecorator(const SyntacticDecorator& other);
00139 };
00140
00143 }
00144
00145 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00146 # include <vaucanson/design_pattern/syntactic_decorator.hxx>
00147 # endif // VCSN_USE_INTERFACE_ONLY
00148
00149 #endif // ! VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH