CallableTransform.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" ?>
  2. <!--
  3. Copyright 2008 Eric Niebler
  4. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <concept name="CallableTransform" category="utility">
  9. <param name="Fn" role="polymorphic-function-object-type" />
  10. <param name="Tn" role="transform-type" />
  11. <param name="Expr" role="expression-type" />
  12. <param name="State" role="state-type" />
  13. <param name="Data" role="data-type" />
  14. <models-sentence>
  15. The type <arg num="1" /> must be a model of <conceptname name="PolymorphicFunctionObject"/>.
  16. The type <arg num="2" /> must be a model of <conceptname name="Transform"/>.
  17. </models-sentence>
  18. <description>
  19. <para>
  20. A CallableTransform is a function type or a function
  21. pointer type where the return type Fn is a
  22. PolymorphicFunctionObject and the arguments are
  23. Transforms. is_callable&lt; Fn &gt;::value
  24. must be true. The CallableTransform, when applied,
  25. has the effect of invoking the polymorphic function
  26. object Fn, passing as arguments the result(s)
  27. of applying transform(s) Tn.
  28. </para>
  29. </description>
  30. <notation variables="fn">
  31. <sample-value>
  32. <type name="Fn" />
  33. </sample-value>
  34. </notation>
  35. <notation variables="expr">
  36. <sample-value>
  37. <type name="Expr" />
  38. </sample-value>
  39. </notation>
  40. <notation variables="state">
  41. <sample-value>
  42. <type name="State" />
  43. </sample-value>
  44. </notation>
  45. <notation variables="data">
  46. <sample-value>
  47. <type name="Data" />
  48. </sample-value>
  49. </notation>
  50. <associated-type name="result_type">
  51. <get-member-type name="type">
  52. <apply-template name="boost::result_of">
  53. <type name="Fn(Transform&lt;Tn, Expr, State, Data&gt;::result_type...)"/>
  54. </apply-template>
  55. </get-member-type>
  56. <description>
  57. <simpara>The result of applying the CallableTransform.</simpara>
  58. </description>
  59. </associated-type>
  60. <valid-expression name="Apply Transform">
  61. <apply-function name="when&lt; _, Fn(Tn...)&gt;()">
  62. <sample-value>
  63. <type name="Expr" />
  64. </sample-value>
  65. <sample-value>
  66. <type name="State" />
  67. </sample-value>
  68. <sample-value>
  69. <type name="Data" />
  70. </sample-value>
  71. </apply-function>
  72. <return-type>
  73. <require-same-type testable="yes">
  74. <type name="result_type"/>
  75. </require-same-type>
  76. </return-type>
  77. <semantics>Applies the transform.</semantics>
  78. </valid-expression>
  79. <example-model>
  80. <type name="boost::proto::_child(boost::proto::_left)" />
  81. </example-model>
  82. </concept>