18 #ifndef VCSN_AUTOMATA_CONCEPT_SMART_LABEL_HH_
19 # define VCSN_AUTOMATA_CONCEPT_SMART_LABEL_HH_
21 # include <boost/multi_index_container.hpp>
22 # include <boost/multi_index/member.hpp>
23 # include <boost/multi_index/mem_fun.hpp>
24 # include <boost/multi_index/hashed_index.hpp>
25 # include <boost/shared_ptr.hpp>
27 # include <vaucanson/automata/concept/handlers.hh>
28 # include <vaucanson/misc/hash.hh>
41 explicit SmartLabel(const ::boost::shared_ptr<T>& l);
43 const T& value ()
const;
53 ::boost::shared_ptr<T> value_;
58 class SmartLabelContainer
65 typedef ::boost::multi_index_container<
67 ::boost::multi_index::indexed_by<
68 ::boost::multi_index::hashed_unique<
69 ::boost::multi_index::tag<label>,
70 BOOST_MULTI_INDEX_CONST_MEM_FUN (SmartLabel<T>,
const T&, value),
76 label_container_t data_;
79 typedef handler<label_h, const SmartLabel<T>*> hlabel_t;
81 hlabel_t insert (
const T&);
82 void erase (
const hlabel_t&);
83 hlabel_t update (
const hlabel_t&,
const T&);
85 const T& get_label (
const hlabel_t&)
const;
86 hlabel_t get_hlabel (
const T&)
const;
91 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
92 # include <vaucanson/automata/concept/smart_label.hxx>
93 # endif // !VCSN_USE_INTERFACE_ONLY || VCSN_USE_LIB
95 #endif // !VCSN_AUTOMATA_CONCEPT_SMART_LABEL_HH_ //