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