intrusive_fwd.hpp 16 KB

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