![]() |
Home | Libraries | People | FAQ | More |
boost::intrusive::set_base_hook
// In header: <boost/intrusive/set_hook.hpp> template<class... Options> class set_base_hook : public make_set_base_hook::type< O1, O2, O3, O4 > { public: // construct/copy/destruct set_base_hook(); set_base_hook(const set_base_hook &); set_base_hook & operator=(const set_base_hook &); ~set_base_hook(); // public member functions void swap_nodes(set_base_hook &); bool is_linked() const; void unlink(); };
Derive a class from set_base_hook in order to store objects in in a set/multiset. set_base_hook holds the data necessary to maintain the set/multiset and provides an appropriate value_traits class for set/multiset.
The hook admits the following options: tag<>, void_pointer<>, link_mode<> and optimize_size<>.
tag<> defines a tag to identify the node. The same tag value can be used in different classes, but if a class is derived from more than one list_base_hook, then each list_base_hook needs its unique tag.
void_pointer<> is the pointer type that will be used internally in the hook and the container configured to use this hook.
link_mode<> will specify the linking mode of the hook (normal_link, auto_unlink or safe_link).
optimize_size<> will tell the hook to optimize the hook for size instead of speed.