Transform.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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="Transform" category="utility">
  9. <param name="Tn" role="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 Transform is a PrimitiveTransform, a CallableTransform
  19. or an ObjectTransform.
  20. </para>
  21. </description>
  22. <notation variables="expr">
  23. <sample-value>
  24. <type name="Expr" />
  25. </sample-value>
  26. </notation>
  27. <notation variables="state">
  28. <sample-value>
  29. <type name="State" />
  30. </sample-value>
  31. </notation>
  32. <notation variables="data">
  33. <sample-value>
  34. <type name="Data" />
  35. </sample-value>
  36. </notation>
  37. <associated-type name="result_type">
  38. <get-member-type name="type">
  39. <apply-template name="boost::result_of">
  40. <type name="when&lt; _, Tn &gt;(Expr, State, Data)"/>
  41. </apply-template>
  42. </get-member-type>
  43. <description>
  44. <simpara>The result of applying the Transform.</simpara>
  45. </description>
  46. </associated-type>
  47. <valid-expression name="Apply Transform">
  48. <apply-function name="when&lt; _, Tn &gt;()">
  49. <sample-value>
  50. <type name="Expr" />
  51. </sample-value>
  52. <sample-value>
  53. <type name="State" />
  54. </sample-value>
  55. <sample-value>
  56. <type name="Data" />
  57. </sample-value>
  58. </apply-function>
  59. <return-type>
  60. <require-same-type testable="yes">
  61. <type name="result_type"/>
  62. </require-same-type>
  63. </return-type>
  64. <semantics>Applies the transform.</semantics>
  65. </valid-expression>
  66. <example-model>
  67. <type name="boost::proto::_child(boost::proto::_left)" />
  68. </example-model>
  69. </concept>