00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_DESIGN_PATTERN_SLOTS_HH
00018 # define VCSN_DESIGN_PATTERN_SLOTS_HH
00019
00028 # include <vaucanson/design_pattern/predecls.hh>
00029
00030 namespace vcsn {
00031
00034
00035
00036
00037
00059 template<typename S, bool dynamic >
00060 struct SetSlotAttribute
00061 {
00063
00064 SetSlotAttribute();
00065 SetSlotAttribute(const SetSlotAttribute& other);
00066 SetSlotAttribute(const S& other);
00068
00078 const S& _structure_get() const;
00079
00088
00090 void _structure_assign(const SetSlotAttribute& other);
00091
00093 void _structure_attach(const S& other);
00095
00101 bool _structure_bound() const;
00102 };
00103
00114 template<typename S>
00115 struct SetSlotAttribute<S, true>
00116 {
00118 SetSlotAttribute();
00119
00126 SetSlotAttribute(const SetSlotAttribute& other);
00127
00141 SetSlotAttribute(const S& other);
00142
00144 const S& _structure_get() const;
00145
00147
00153 void _structure_assign(const SetSlotAttribute& other);
00154 void _structure_attach(const S& s);
00156
00160 bool _structure_bound() const;
00161
00162 protected:
00163 const S* s_;
00164 };
00165
00166
00167
00168
00169
00170
00191 template<typename S, typename Tag>
00192 struct SetSlot : SetSlotAttribute<S, dynamic_traits<S>::ret>
00193 {
00194 typedef Tag tag_type;
00195
00197
00201 SetSlot();
00202 SetSlot(const SetSlot& other);
00203 SetSlot(const S& other);
00205 };
00206
00209 }
00210
00211 # ifndef VCSN_USE_INTERFACE_ONLY
00212 # include <vaucanson/design_pattern/slots.hxx>
00213 # endif // VCSN_USE_INTERFACE_ONLY
00214
00215 #endif // ! VCSN_DESIGN_PATTERN_SLOTS_HH