set.hpp 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(FUSION_SET_09162005_1104)
  7. #define FUSION_SET_09162005_1104
  8. #include <boost/fusion/support/sequence_base.hpp>
  9. #include <boost/fusion/support/category_of.hpp>
  10. #include <boost/fusion/support/detail/access.hpp>
  11. #include <boost/fusion/container/set/set_fwd.hpp>
  12. #include <boost/fusion/container/set/detail/begin_impl.hpp>
  13. #include <boost/fusion/container/set/detail/end_impl.hpp>
  14. #include <boost/fusion/container/set/detail/value_of_impl.hpp>
  15. #include <boost/fusion/container/set/detail/deref_data_impl.hpp>
  16. #include <boost/fusion/container/set/detail/deref_impl.hpp>
  17. #include <boost/fusion/container/set/detail/key_of_impl.hpp>
  18. #include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
  19. #include <boost/fusion/container/vector/vector.hpp>
  20. #include <boost/mpl/identity.hpp>
  21. #include <boost/mpl/bool.hpp>
  22. #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
  23. #include <boost/fusion/container/set/detail/preprocessed/set.hpp>
  24. #else
  25. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  26. #pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/set" FUSION_MAX_SET_SIZE_STR ".hpp")
  27. #endif
  28. /*=============================================================================
  29. Copyright (c) 2001-2011 Joel de Guzman
  30. Distributed under the Boost Software License, Version 1.0. (See accompanying
  31. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  32. This is an auto-generated file. Do not edit!
  33. ==============================================================================*/
  34. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  35. #pragma wave option(preserve: 1)
  36. #endif
  37. namespace boost { namespace fusion
  38. {
  39. struct void_;
  40. struct fusion_sequence_tag;
  41. template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)>
  42. struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> >
  43. {
  44. struct category : forward_traversal_tag, associative_tag {};
  45. typedef set_tag fusion_tag;
  46. typedef fusion_sequence_tag tag; // this gets picked up by MPL
  47. typedef mpl::false_ is_view;
  48. typedef vector<
  49. BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)>
  50. storage_type;
  51. typedef typename storage_type::size size;
  52. set()
  53. : data() {}
  54. template <typename Sequence>
  55. set(Sequence const& rhs)
  56. : data(rhs) {}
  57. #include <boost/fusion/container/set/detail/set_forward_ctor.hpp>
  58. template <typename T>
  59. set&
  60. operator=(T const& rhs)
  61. {
  62. data = rhs;
  63. return *this;
  64. }
  65. storage_type& get_data() { return data; }
  66. storage_type const& get_data() const { return data; }
  67. private:
  68. storage_type data;
  69. };
  70. }}
  71. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  72. #pragma wave option(output: null)
  73. #endif
  74. #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
  75. #endif