• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga  2007-2013
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 //    (See accompanying file LICENSE_1_0.txt or copy at
7 //          http://www.boost.org/LICENSE_1_0.txt)
8 //
9 // See http://www.boost.org/libs/intrusive for documentation.
10 //
11 /////////////////////////////////////////////////////////////////////////////
12 
13 #ifndef BOOST_INTRUSIVE_FWD_HPP
14 #define BOOST_INTRUSIVE_FWD_HPP
15 
16 #ifndef BOOST_CONFIG_HPP
17 #  include <boost/config.hpp>
18 #endif
19 #
20 #ifndef BOOST_CSTDINT_HPP
21 #  include <boost/cstdint.hpp>
22 #endif
23 #
24 #if defined(BOOST_HAS_PRAGMA_ONCE)
25 #  pragma once
26 #endif
27 
28 //! \file
29 //! This header file forward declares most Intrusive classes.
30 //!
31 //! It forward declares the following containers and hooks:
32 //!   - boost::intrusive::slist / boost::intrusive::slist_base_hook / boost::intrusive::slist_member_hook
33 //!   - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
34 //!   - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
35 //!      boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
36 //!   - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
37 //!      boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
38 //!   - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
39 //!      boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
40 //!   - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
41 //!   - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
42 //!   - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
43 //!   - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
44 //!      boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
45 //!   - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
46 //!
47 //! It forward declares the following container or hook options:
48 //!   - boost::intrusive::constant_time_size / boost::intrusive::size_type / boost::intrusive::compare / boost::intrusive::equal
49 //!   - boost::intrusive::floating_point / boost::intrusive::priority / boost::intrusive::hash
50 //!   - boost::intrusive::value_traits / boost::intrusive::member_hook / boost::intrusive::function_hook / boost::intrusive::base_hook
51 //!   - boost::intrusive::void_pointer / boost::intrusive::tag / boost::intrusive::link_mode
52 //!   - boost::intrusive::optimize_size / boost::intrusive::linear / boost::intrusive::cache_last
53 //!   - boost::intrusive::bucket_traits / boost::intrusive::store_hash / boost::intrusive::optimize_multikey
54 //!   - boost::intrusive::power_2_buckets / boost::intrusive::cache_begin / boost::intrusive::compare_hash / boost::intrusive::incremental
55 //!
56 //! It forward declares the following value traits utilities:
57 //!   - boost::intrusive::value_traits / boost::intrusive::derivation_value_traits /
58 //!      boost::intrusive::trivial_value_traits
59 //!
60 //! Finally it forward declares the following general purpose utilities:
61 //!   - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
62 
63 #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
64 
65 #include <cstddef>
66 #include <boost/intrusive/link_mode.hpp>
67 #include <boost/intrusive/detail/workaround.hpp>
68 
69 namespace boost {
70 namespace intrusive {
71 
72 #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
73 #  ifdef BOOST_HAS_INTPTR_T
74       using ::boost::uintptr_t;
75 #  else
76       typedef std::size_t uintptr_t;
77 #  endif
78 #endif
79 
80 ////////////////////////////
81 //     Node algorithms
82 ////////////////////////////
83 
84 //Algorithms predeclarations
85 template<class NodeTraits>
86 class circular_list_algorithms;
87 
88 template<class NodeTraits>
89 class circular_slist_algorithms;
90 
91 template<class NodeTraits>
92 class linear_slist_algorithms;
93 
94 template<class NodeTraits>
95 class bstree_algorithms;
96 
97 template<class NodeTraits>
98 class rbtree_algorithms;
99 
100 template<class NodeTraits>
101 class avltree_algorithms;
102 
103 template<class NodeTraits>
104 class sgtree_algorithms;
105 
106 template<class NodeTraits>
107 class splaytree_algorithms;
108 
109 template<class NodeTraits>
110 class treap_algorithms;
111 
112 ////////////////////////////
113 //       Containers
114 ////////////////////////////
115 
116 //slist
117 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
118 template
119    < class T
120    , class O1  = void
121    , class O2  = void
122    , class O3  = void
123    , class O4  = void
124    , class O5  = void
125    , class O6  = void
126    >
127 #else
128 template<class T, class ...Options>
129 #endif
130 class slist;
131 
132 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
133 template
134    < class O1  = void
135    , class O2  = void
136    , class O3  = void
137    >
138 #else
139 template<class ...Options>
140 #endif
141 class slist_base_hook;
142 
143 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
144 template
145    < class O1  = void
146    , class O2  = void
147    , class O3  = void
148    >
149 #else
150 template<class ...Options>
151 #endif
152 class slist_member_hook;
153 
154 //list
155 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
156 template
157    < class T
158    , class O1  = void
159    , class O2  = void
160    , class O3  = void
161    , class O4  = void
162    >
163 #else
164 template<class T, class ...Options>
165 #endif
166 class list;
167 
168 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
169 template
170    < class O1  = void
171    , class O2  = void
172    , class O3  = void
173    >
174 #else
175 template<class ...Options>
176 #endif
177 class list_base_hook;
178 
179 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
180 template
181    < class O1  = void
182    , class O2  = void
183    , class O3  = void
184    >
185 #else
186 template<class ...Options>
187 #endif
188 class list_member_hook;
189 
190 //rbtree/set/multiset
191 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
192 template
193    < class T
194    , class O1  = void
195    , class O2  = void
196    , class O3  = void
197    , class O4  = void
198    , class O5  = void
199    , class O6  = void
200    >
201 #else
202 template<class T, class ...Options>
203 #endif
204 class rbtree;
205 
206 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
207 template
208    < class T
209    , class O1  = void
210    , class O2  = void
211    , class O3  = void
212    , class O4  = void
213    , class O5  = void
214    , class O6  = void
215    >
216 #else
217 template<class T, class ...Options>
218 #endif
219 class set;
220 
221 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
222 template
223    < class T
224    , class O1  = void
225    , class O2  = void
226    , class O3  = void
227    , class O4  = void
228    , class O5  = void
229    , class O6  = void
230    >
231 #else
232 template<class T, class ...Options>
233 #endif
234 class multiset;
235 
236 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
237 template
238    < class O1  = void
239    , class O2  = void
240    , class O3  = void
241    , class O4  = void
242    >
243 #else
244 template<class ...Options>
245 #endif
246 class set_base_hook;
247 
248 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
249 template
250    < class O1  = void
251    , class O2  = void
252    , class O3  = void
253    , class O4  = void
254    >
255 #else
256 template<class ...Options>
257 #endif
258 class set_member_hook;
259 
260 //splaytree/splay_set/splay_multiset
261 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
262 template
263    < class T
264    , class O1  = void
265    , class O2  = void
266    , class O3  = void
267    , class O4  = void
268    , class O5  = void
269    , class O6  = void
270    >
271 #else
272 template<class T, class ...Options>
273 #endif
274 class splaytree;
275 
276 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
277 template
278    < class T
279    , class O1  = void
280    , class O2  = void
281    , class O3  = void
282    , class O4  = void
283    , class O5  = void
284    , class O6  = void
285    >
286 #else
287 template<class T, class ...Options>
288 #endif
289 class splay_set;
290 
291 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
292 template
293    < class T
294    , class O1  = void
295    , class O2  = void
296    , class O3  = void
297    , class O4  = void
298    , class O5  = void
299    , class O6  = void
300    >
301 #else
302 template<class T, class ...Options>
303 #endif
304 class splay_multiset;
305 
306 //avltree/avl_set/avl_multiset
307 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
308 template
309    < class T
310    , class O1  = void
311    , class O2  = void
312    , class O3  = void
313    , class O4  = void
314    , class O5  = void
315    , class O6  = void
316    >
317 #else
318 template<class T, class ...Options>
319 #endif
320 class avltree;
321 
322 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
323 template
324    < class T
325    , class O1  = void
326    , class O2  = void
327    , class O3  = void
328    , class O4  = void
329    , class O5  = void
330    , class O6  = void
331    >
332 #else
333 template<class T, class ...Options>
334 #endif
335 class avl_set;
336 
337 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
338 template
339    < class T
340    , class O1  = void
341    , class O2  = void
342    , class O3  = void
343    , class O4  = void
344    , class O5  = void
345    , class O6  = void
346    >
347 #else
348 template<class T, class ...Options>
349 #endif
350 class avl_multiset;
351 
352 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
353 template
354    < class O1  = void
355    , class O2  = void
356    , class O3  = void
357    , class O4  = void
358    >
359 #else
360 template<class ...Options>
361 #endif
362 class avl_set_base_hook;
363 
364 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
365 template
366    < class O1  = void
367    , class O2  = void
368    , class O3  = void
369    , class O4  = void
370    >
371 #else
372 template<class ...Options>
373 #endif
374 class avl_set_member_hook;
375 
376 
377 //treap/treap_set/treap_multiset
378 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
379 template
380    < class T
381    , class O1  = void
382    , class O2  = void
383    , class O3  = void
384    , class O4  = void
385    , class O5  = void
386    , class O6  = void
387    , class O7  = void
388    >
389 #else
390 template<class T, class ...Options>
391 #endif
392 class treap;
393 
394 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
395 template
396    < class T
397    , class O1  = void
398    , class O2  = void
399    , class O3  = void
400    , class O4  = void
401    , class O5  = void
402    , class O6  = void
403    , class O7  = void
404    >
405 #else
406 template<class T, class ...Options>
407 #endif
408 class treap_set;
409 
410 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
411 template
412    < class T
413    , class O1  = void
414    , class O2  = void
415    , class O3  = void
416    , class O4  = void
417    , class O5  = void
418    , class O6  = void
419    , class O7  = void
420    >
421 #else
422 template<class T, class ...Options>
423 #endif
424 class treap_multiset;
425 
426 //sgtree/sg_set/sg_multiset
427 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
428 template
429    < class T
430    , class O1  = void
431    , class O2  = void
432    , class O3  = void
433    , class O4  = void
434    , class O5  = void
435    , class O6  = void
436    >
437 #else
438 template<class T, class ...Options>
439 #endif
440 class sgtree;
441 
442 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
443 template
444    < class T
445    , class O1  = void
446    , class O2  = void
447    , class O3  = void
448    , class O4  = void
449    , class O5  = void
450    , class O6  = void
451    >
452 #else
453 template<class T, class ...Options>
454 #endif
455 class sg_set;
456 
457 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
458 template
459    < class T
460    , class O1  = void
461    , class O2  = void
462    , class O3  = void
463    , class O4  = void
464    , class O5  = void
465    , class O6  = void
466    >
467 #else
468 template<class T, class ...Options>
469 #endif
470 class sg_multiset;
471 
472 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
473 template
474    < class T
475    , class O1  = void
476    , class O2  = void
477    , class O3  = void
478    , class O4  = void
479    , class O5  = void
480    , class O6  = void
481    >
482 #else
483 template<class T, class ...Options>
484 #endif
485 class bstree;
486 
487 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
488 template
489    < class T
490    , class O1  = void
491    , class O2  = void
492    , class O3  = void
493    , class O4  = void
494    , class O5  = void
495    , class O6  = void
496    >
497 #else
498 template<class T, class ...Options>
499 #endif
500 class bs_set;
501 
502 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
503 template
504    < class T
505    , class O1  = void
506    , class O2  = void
507    , class O3  = void
508    , class O4  = void
509    , class O5  = void
510    , class O6  = void
511    >
512 #else
513 template<class T, class ...Options>
514 #endif
515 class bs_multiset;
516 
517 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
518 template
519    < class O1  = void
520    , class O2  = void
521    , class O3  = void
522    >
523 #else
524 template<class ...Options>
525 #endif
526 class bs_set_base_hook;
527 
528 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
529 template
530    < class O1  = void
531    , class O2  = void
532    , class O3  = void
533    >
534 #else
535 template<class ...Options>
536 #endif
537 class bs_set_member_hook;
538 
539 //hashtable/unordered_set/unordered_multiset
540 
541 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
542 template
543    < class T
544    , class O1  = void
545    , class O2  = void
546    , class O3  = void
547    , class O4  = void
548    , class O5  = void
549    , class O6  = void
550    , class O7  = void
551    , class O8  = void
552    , class O9  = void
553    , class O10 = void
554    >
555 #else
556 template<class T, class ...Options>
557 #endif
558 class hashtable;
559 
560 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
561 template
562    < class T
563    , class O1  = void
564    , class O2  = void
565    , class O3  = void
566    , class O4  = void
567    , class O5  = void
568    , class O6  = void
569    , class O7  = void
570    , class O8  = void
571    , class O9  = void
572    , class O10 = void
573    >
574 #else
575 template<class T, class ...Options>
576 #endif
577 class unordered_set;
578 
579 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
580 template
581    < class T
582    , class O1  = void
583    , class O2  = void
584    , class O3  = void
585    , class O4  = void
586    , class O5  = void
587    , class O6  = void
588    , class O7  = void
589    , class O8  = void
590    , class O9  = void
591    , class O10 = void
592    >
593 #else
594 template<class T, class ...Options>
595 #endif
596 class unordered_multiset;
597 
598 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
599 template
600    < class O1  = void
601    , class O2  = void
602    , class O3  = void
603    , class O4  = void
604    >
605 #else
606 template<class ...Options>
607 #endif
608 class unordered_set_base_hook;
609 
610 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
611 template
612    < class O1  = void
613    , class O2  = void
614    , class O3  = void
615    , class O4  = void
616    >
617 #else
618 template<class ...Options>
619 #endif
620 class unordered_set_member_hook;
621 
622 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
623 template
624    < class O1  = void
625    , class O2  = void
626    , class O3  = void
627    >
628 #else
629 template<class ...Options>
630 #endif
631 class any_base_hook;
632 
633 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
634 template
635    < class O1  = void
636    , class O2  = void
637    , class O3  = void
638    >
639 #else
640 template<class ...Options>
641 #endif
642 class any_member_hook;
643 
644 //Options
645 
646 template<bool Enabled>
647 struct constant_time_size;
648 
649 template<typename SizeType>
650 struct size_type;
651 
652 template<typename Compare>
653 struct compare;
654 
655 template<bool Enabled>
656 struct floating_point;
657 
658 template<typename Equal>
659 struct equal;
660 
661 template<typename Priority>
662 struct priority;
663 
664 template<typename Hash>
665 struct hash;
666 
667 template<typename ValueTraits> struct value_traits;
668 
669 template< typename Parent
670         , typename MemberHook
671         , MemberHook Parent::* PtrToMember>
672 struct member_hook;
673 
674 template<typename Functor>
675 struct function_hook;
676 
677 template<typename BaseHook>
678 struct base_hook;
679 
680 template<typename VoidPointer>
681 struct void_pointer;
682 
683 template<typename Tag>
684 struct tag;
685 
686 template<link_mode_type LinkType>
687 struct link_mode;
688 
689 template<bool Enabled> struct
690 optimize_size;
691 
692 template<bool Enabled>
693 struct linear;
694 
695 template<bool Enabled>
696 struct cache_last;
697 
698 template<typename BucketTraits>
699 struct bucket_traits;
700 
701 template<bool Enabled>
702 struct store_hash;
703 
704 template<bool Enabled>
705 struct optimize_multikey;
706 
707 template<bool Enabled>
708 struct power_2_buckets;
709 
710 template<bool Enabled>
711 struct cache_begin;
712 
713 template<bool Enabled>
714 struct compare_hash;
715 
716 template<bool Enabled>
717 struct incremental;
718 
719 //Value traits
720 
721 template<typename ValueTraits>
722 struct value_traits;
723 
724 template< typename Parent
725         , typename MemberHook
726         , MemberHook Parent::* PtrToMember>
727 struct member_hook;
728 
729 template< typename Functor>
730 struct function_hook;
731 
732 template<typename BaseHook>
733 struct base_hook;
734 
735 template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
736 struct derivation_value_traits;
737 
738 template<class NodeTraits, link_mode_type LinkMode = normal_link>
739 struct trivial_value_traits;
740 
741 //Additional utilities
742 
743 template<typename VoidPointer, std::size_t Alignment>
744 struct max_pointer_plus_bits;
745 
746 template<std::size_t Alignment>
747 struct max_pointer_plus_bits<void *, Alignment>;
748 
749 template<typename Pointer, std::size_t NumBits>
750 struct pointer_plus_bits;
751 
752 template<typename T, std::size_t NumBits>
753 struct pointer_plus_bits<T *, NumBits>;
754 
755 template<typename Ptr>
756 struct pointer_traits;
757 
758 template<typename T>
759 struct pointer_traits<T *>;
760 
761 }  //namespace intrusive {
762 }  //namespace boost {
763 
764 #endif   //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
765 
766 #endif   //#ifndef BOOST_INTRUSIVE_FWD_HPP
767