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 | |
65 | namespace boost { |
66 | namespace intrusive { |
67 | |
68 | //////////////////////////// |
69 | // Node algorithms |
70 | //////////////////////////// |
71 | |
72 | //Algorithms predeclarations |
73 | template<class NodeTraits> |
74 | class circular_list_algorithms; |
75 | |
76 | template<class NodeTraits> |
77 | class circular_slist_algorithms; |
78 | |
79 | template<class NodeTraits> |
80 | class linear_slist_algorithms; |
81 | |
82 | template<class NodeTraits> |
83 | class bstree_algorithms; |
84 | |
85 | template<class NodeTraits> |
86 | class rbtree_algorithms; |
87 | |
88 | template<class NodeTraits> |
89 | class avltree_algorithms; |
90 | |
91 | template<class NodeTraits> |
92 | class sgtree_algorithms; |
93 | |
94 | template<class NodeTraits> |
95 | class splaytree_algorithms; |
96 | |
97 | template<class NodeTraits> |
98 | class treap_algorithms; |
99 | |
100 | //////////////////////////// |
101 | // Containers |
102 | //////////////////////////// |
103 | |
104 | //slist |
105 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
106 | template |
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 |
116 | template<class T, class ...Options> |
117 | #endif |
118 | class slist; |
119 | |
120 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
121 | template |
122 | < class O1 = void |
123 | , class O2 = void |
124 | , class O3 = void |
125 | > |
126 | #else |
127 | template<class ...Options> |
128 | #endif |
129 | class slist_base_hook; |
130 | |
131 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
132 | template |
133 | < class O1 = void |
134 | , class O2 = void |
135 | , class O3 = void |
136 | > |
137 | #else |
138 | template<class ...Options> |
139 | #endif |
140 | class slist_member_hook; |
141 | |
142 | //list |
143 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
144 | template |
145 | < class T |
146 | , class O1 = void |
147 | , class O2 = void |
148 | , class O3 = void |
149 | , class O4 = void |
150 | > |
151 | #else |
152 | template<class T, class ...Options> |
153 | #endif |
154 | class list; |
155 | |
156 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
157 | template |
158 | < class O1 = void |
159 | , class O2 = void |
160 | , class O3 = void |
161 | > |
162 | #else |
163 | template<class ...Options> |
164 | #endif |
165 | class list_base_hook; |
166 | |
167 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
168 | template |
169 | < class O1 = void |
170 | , class O2 = void |
171 | , class O3 = void |
172 | > |
173 | #else |
174 | template<class ...Options> |
175 | #endif |
176 | class list_member_hook; |
177 | |
178 | //rbtree/set/multiset |
179 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
180 | template |
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 |
189 | template<class T, class ...Options> |
190 | #endif |
191 | class rbtree; |
192 | |
193 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
194 | template |
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 |
203 | template<class T, class ...Options> |
204 | #endif |
205 | class set; |
206 | |
207 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
208 | template |
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 |
217 | template<class T, class ...Options> |
218 | #endif |
219 | class multiset; |
220 | |
221 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
222 | template |
223 | < class O1 = void |
224 | , class O2 = void |
225 | , class O3 = void |
226 | , class O4 = void |
227 | > |
228 | #else |
229 | template<class ...Options> |
230 | #endif |
231 | class set_base_hook; |
232 | |
233 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
234 | template |
235 | < class O1 = void |
236 | , class O2 = void |
237 | , class O3 = void |
238 | , class O4 = void |
239 | > |
240 | #else |
241 | template<class ...Options> |
242 | #endif |
243 | class set_member_hook; |
244 | |
245 | //splaytree/splay_set/splay_multiset |
246 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
247 | template |
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 |
256 | template<class T, class ...Options> |
257 | #endif |
258 | class splaytree; |
259 | |
260 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
261 | template |
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 |
270 | template<class T, class ...Options> |
271 | #endif |
272 | class splay_set; |
273 | |
274 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
275 | template |
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 |
284 | template<class T, class ...Options> |
285 | #endif |
286 | class splay_multiset; |
287 | |
288 | //avltree/avl_set/avl_multiset |
289 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
290 | template |
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 |
299 | template<class T, class ...Options> |
300 | #endif |
301 | class avltree; |
302 | |
303 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
304 | template |
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 |
313 | template<class T, class ...Options> |
314 | #endif |
315 | class avl_set; |
316 | |
317 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
318 | template |
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 |
327 | template<class T, class ...Options> |
328 | #endif |
329 | class avl_multiset; |
330 | |
331 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
332 | template |
333 | < class O1 = void |
334 | , class O2 = void |
335 | , class O3 = void |
336 | , class O4 = void |
337 | > |
338 | #else |
339 | template<class ...Options> |
340 | #endif |
341 | class avl_set_base_hook; |
342 | |
343 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
344 | template |
345 | < class O1 = void |
346 | , class O2 = void |
347 | , class O3 = void |
348 | , class O4 = void |
349 | > |
350 | #else |
351 | template<class ...Options> |
352 | #endif |
353 | class avl_set_member_hook; |
354 | |
355 | |
356 | //treap/treap_set/treap_multiset |
357 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
358 | template |
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 |
367 | template<class T, class ...Options> |
368 | #endif |
369 | class treap; |
370 | |
371 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
372 | template |
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 |
381 | template<class T, class ...Options> |
382 | #endif |
383 | class treap_set; |
384 | |
385 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
386 | template |
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 |
395 | template<class T, class ...Options> |
396 | #endif |
397 | class treap_multiset; |
398 | |
399 | //sgtree/sg_set/sg_multiset |
400 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
401 | template |
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 |
410 | template<class T, class ...Options> |
411 | #endif |
412 | class sgtree; |
413 | |
414 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
415 | template |
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 |
424 | template<class T, class ...Options> |
425 | #endif |
426 | class sg_set; |
427 | |
428 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
429 | template |
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 |
438 | template<class T, class ...Options> |
439 | #endif |
440 | class sg_multiset; |
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 | > |
451 | #else |
452 | template<class T, class ...Options> |
453 | #endif |
454 | class bstree; |
455 | |
456 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
457 | template |
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 |
466 | template<class T, class ...Options> |
467 | #endif |
468 | class bs_set; |
469 | |
470 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
471 | template |
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 |
480 | template<class T, class ...Options> |
481 | #endif |
482 | class bs_multiset; |
483 | |
484 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
485 | template |
486 | < class O1 = void |
487 | , class O2 = void |
488 | , class O3 = void |
489 | > |
490 | #else |
491 | template<class ...Options> |
492 | #endif |
493 | class bs_set_base_hook; |
494 | |
495 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
496 | template |
497 | < class O1 = void |
498 | , class O2 = void |
499 | , class O3 = void |
500 | > |
501 | #else |
502 | template<class ...Options> |
503 | #endif |
504 | class bs_set_member_hook; |
505 | |
506 | //hashtable/unordered_set/unordered_multiset |
507 | |
508 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
509 | template |
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 |
523 | template<class T, class ...Options> |
524 | #endif |
525 | class hashtable; |
526 | |
527 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
528 | template |
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 |
542 | template<class T, class ...Options> |
543 | #endif |
544 | class unordered_set; |
545 | |
546 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
547 | template |
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 |
561 | template<class T, class ...Options> |
562 | #endif |
563 | class unordered_multiset; |
564 | |
565 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
566 | template |
567 | < class O1 = void |
568 | , class O2 = void |
569 | , class O3 = void |
570 | , class O4 = void |
571 | > |
572 | #else |
573 | template<class ...Options> |
574 | #endif |
575 | class unordered_set_base_hook; |
576 | |
577 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
578 | template |
579 | < class O1 = void |
580 | , class O2 = void |
581 | , class O3 = void |
582 | , class O4 = void |
583 | > |
584 | #else |
585 | template<class ...Options> |
586 | #endif |
587 | class unordered_set_member_hook; |
588 | |
589 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
590 | template |
591 | < class O1 = void |
592 | , class O2 = void |
593 | , class O3 = void |
594 | > |
595 | #else |
596 | template<class ...Options> |
597 | #endif |
598 | class any_base_hook; |
599 | |
600 | #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
601 | template |
602 | < class O1 = void |
603 | , class O2 = void |
604 | , class O3 = void |
605 | > |
606 | #else |
607 | template<class ...Options> |
608 | #endif |
609 | class any_member_hook; |
610 | |
611 | //Options |
612 | |
613 | template<bool Enabled> |
614 | struct constant_time_size; |
615 | |
616 | template<typename SizeType> |
617 | struct size_type; |
618 | |
619 | template<typename Compare> |
620 | struct compare; |
621 | |
622 | template<bool Enabled> |
623 | struct floating_point; |
624 | |
625 | template<typename Equal> |
626 | struct equal; |
627 | |
628 | template<typename Priority> |
629 | struct priority; |
630 | |
631 | template<typename Hash> |
632 | struct hash; |
633 | |
634 | template<typename ValueTraits> struct value_traits; |
635 | |
636 | template< typename Parent |
637 | , typename MemberHook |
638 | , MemberHook Parent::* PtrToMember> |
639 | struct member_hook; |
640 | |
641 | template<typename Functor> |
642 | struct function_hook; |
643 | |
644 | template<typename BaseHook> |
645 | struct base_hook; |
646 | |
647 | template<typename VoidPointer> |
648 | struct void_pointer; |
649 | |
650 | template<typename Tag> |
651 | struct tag; |
652 | |
653 | template<link_mode_type LinkType> |
654 | struct link_mode; |
655 | |
656 | template<bool Enabled> struct |
657 | optimize_size; |
658 | |
659 | template<bool Enabled> |
660 | struct linear; |
661 | |
662 | template<bool Enabled> |
663 | struct cache_last; |
664 | |
665 | template<typename BucketTraits> |
666 | struct bucket_traits; |
667 | |
668 | template<bool Enabled> |
669 | struct store_hash; |
670 | |
671 | template<bool Enabled> |
672 | struct optimize_multikey; |
673 | |
674 | template<bool Enabled> |
675 | struct power_2_buckets; |
676 | |
677 | template<bool Enabled> |
678 | struct cache_begin; |
679 | |
680 | template<bool Enabled> |
681 | struct compare_hash; |
682 | |
683 | template<bool Enabled> |
684 | struct incremental; |
685 | |
686 | //Value traits |
687 | |
688 | template<typename ValueTraits> |
689 | struct value_traits; |
690 | |
691 | template< typename Parent |
692 | , typename MemberHook |
693 | , MemberHook Parent::* PtrToMember> |
694 | struct member_hook; |
695 | |
696 | template< typename Functor> |
697 | struct function_hook; |
698 | |
699 | template<typename BaseHook> |
700 | struct base_hook; |
701 | |
702 | template<class T, class NodeTraits, link_mode_type LinkMode = safe_link> |
703 | struct derivation_value_traits; |
704 | |
705 | template<class NodeTraits, link_mode_type LinkMode = normal_link> |
706 | struct trivial_value_traits; |
707 | |
708 | //Additional utilities |
709 | |
710 | template<typename VoidPointer, std::size_t Alignment> |
711 | struct max_pointer_plus_bits; |
712 | |
713 | template<std::size_t Alignment> |
714 | struct max_pointer_plus_bits<void *, Alignment>; |
715 | |
716 | template<typename Pointer, std::size_t NumBits> |
717 | struct pointer_plus_bits; |
718 | |
719 | template<typename T, std::size_t NumBits> |
720 | struct pointer_plus_bits<T *, NumBits>; |
721 | |
722 | template<typename Ptr> |
723 | struct pointer_traits; |
724 | |
725 | template<typename T> |
726 | struct 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 | |