attributes.qbk 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [/
  2. Copyright Oliver Kowalke 2009.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt
  6. ]
  7. [section:attributes Attributes]
  8. Class `attributes` is used to specify parameters required to setup a
  9. coroutine's context.
  10. enum flag_unwind_t
  11. {
  12. stack_unwind,
  13. no_stack_unwind
  14. };
  15. struct attributes
  16. {
  17. std::size_t size;
  18. flag_unwind_t do_unwind;
  19. attributes() noexcept;
  20. explicit attributes( std::size_t size_) noexcept;
  21. explicit attributes( flag_unwind_t do_unwind_) noexcept;
  22. explicit attributes( std::size_t size_, flag_unwind_t do_unwind_) noexcept;
  23. };
  24. [heading `attributes()`]
  25. [variablelist
  26. [[Effects:] [Default constructor using `boost::context::default_stacksize()`, does unwind
  27. the stack after coroutine/generator is complete.]]
  28. [[Throws:] [Nothing.]]
  29. ]
  30. [heading `attributes( std::size_t size)`]
  31. [variablelist
  32. [[Effects:] [Argument `size` defines stack size of the new coroutine.
  33. Stack unwinding after termination.]]
  34. [[Throws:] [Nothing.]]
  35. ]
  36. [heading `attributes( flag_unwind_t do_unwind)`]
  37. [variablelist
  38. [[Effects:] [Argument `do_unwind` determines if stack will be unwound after
  39. termination or not. The default stacksize is used for the new coroutine.]]
  40. [[Throws:] [Nothing.]]
  41. ]
  42. [heading `attributes( std::size_t size, flag_unwind_t do_unwind)`]
  43. [variablelist
  44. [[Effects:] [Arguments `size` and `do_unwind` are given by the user.]]
  45. [[Throws:] [Nothing.]]
  46. ]
  47. [endsect]