BasicPrimitiveTransform.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" ?>
  2. <concept name="BasicPrimitiveTransform" category="utility">
  3. <!--
  4. Copyright 2008 Eric Niebler
  5. Distributed under the Boost
  6. Software License, Version 1.0. (See accompanying
  7. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. -->
  9. <param name="Fn" role="basic-primitive-transform-type" />
  10. <param name="Expr" role="expression-type" />
  11. <param name="State" role="state-type" />
  12. <param name="Data" role="data-type" />
  13. <models-sentence>
  14. The type <arg num="1" /> must be a model of <self/>.
  15. </models-sentence>
  16. <description>
  17. <para>
  18. A BasicPrimitiveTransform is class type that
  19. has a nested class template called impl that takes
  20. three template parameters representing an expression
  21. type, a state type and a data type. Specializations
  22. of the nested impl template are ternary monomorphic
  23. function objects that accept expression, state, and
  24. data parameters.
  25. </para>
  26. </description>
  27. <notation variables="fn">
  28. <sample-value>
  29. <type name="Fn" />
  30. </sample-value>
  31. </notation>
  32. <notation variables="expr">
  33. <sample-value>
  34. <type name="Expr" />
  35. </sample-value>
  36. </notation>
  37. <notation variables="state">
  38. <sample-value>
  39. <type name="State" />
  40. </sample-value>
  41. </notation>
  42. <notation variables="data">
  43. <sample-value>
  44. <type name="Data" />
  45. </sample-value>
  46. </notation>
  47. <associated-type name="result_type">
  48. <get-member-type name="result_type">
  49. <apply-template name="typename Fn::template impl">
  50. <type name="Expr"/>
  51. <type name="State"/>
  52. <type name="Data"/>
  53. </apply-template>
  54. </get-member-type>
  55. <description>
  56. <simpara>The return type of the overloaded function call operator.</simpara>
  57. </description>
  58. </associated-type>
  59. <valid-expression name="Monomorphic Function Call">
  60. <apply-function name="typename Fn::template impl&lt; Expr, State, Data &gt;()">
  61. <sample-value>
  62. <type name="Expr" />
  63. </sample-value>
  64. <sample-value>
  65. <type name="State" />
  66. </sample-value>
  67. <sample-value>
  68. <type name="Data" />
  69. </sample-value>
  70. </apply-function>
  71. <return-type>
  72. <require-same-type testable="yes">
  73. <type name="result_type"/>
  74. </require-same-type>
  75. </return-type>
  76. <semantics>Applies the transform.</semantics>
  77. </valid-expression>
  78. <example-model>
  79. <type name="boost::proto::terminal&lt; int &gt;" />
  80. </example-model>
  81. </concept>