eval.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2012 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. <header name="boost/proto/eval.hpp">
  9. <para>
  10. Contains the
  11. <computeroutput>
  12. <functionname alt="boost::proto::eval">proto::eval()</functionname>
  13. </computeroutput> expression evaluator.
  14. </para>
  15. <namespace name="boost">
  16. <namespace name="proto">
  17. <namespace name="functional">
  18. <!-- proto::functional::eval-->
  19. <struct name="eval">
  20. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type for evaluating a given Proto
  21. expression with a given context.</purpose>
  22. <inherit>
  23. <type><classname>proto::callable</classname></type>
  24. </inherit>
  25. <struct-specialization name="result">
  26. <template>
  27. <template-type-parameter name="This"/>
  28. <template-type-parameter name="Expr"/>
  29. <template-type-parameter name="Context"/>
  30. </template>
  31. <specialization>
  32. <template-arg>This(Expr, Context)</template-arg>
  33. </specialization>
  34. <inherit>
  35. <type>
  36. <classname>proto::result_of::eval</classname>&lt;
  37. typename boost::remove_reference&lt; Expr &gt;::type,
  38. typename boost::remove_reference&lt; Context &gt;::type
  39. &gt;</type>
  40. </inherit>
  41. </struct-specialization>
  42. <method-group name="public member functions">
  43. <method name="operator()" cv="const">
  44. <type>typename <classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type>
  45. <template>
  46. <template-type-parameter name="Expr"/>
  47. <template-type-parameter name="Context"/>
  48. </template>
  49. <parameter name="expr">
  50. <paramtype>Expr &amp;</paramtype>
  51. <description>
  52. <para>The Proto expression to evaluate.</para>
  53. </description>
  54. </parameter>
  55. <parameter name="context">
  56. <paramtype>Context &amp;</paramtype>
  57. <description>
  58. <para>The context in which the expression should be evaluated. </para>
  59. </description>
  60. </parameter>
  61. <purpose>Evaluate a given Proto expression with a given context. </purpose>
  62. <returns>
  63. <para>
  64. <computeroutput>typename Context::template eval&lt;Expr&gt;()(expr, context)</computeroutput>
  65. </para>
  66. </returns>
  67. </method>
  68. <method name="operator()" cv="const">
  69. <type>typename <classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type>
  70. <template>
  71. <template-type-parameter name="Expr"/>
  72. <template-type-parameter name="Context"/>
  73. </template>
  74. <parameter name="expr">
  75. <paramtype>Expr &amp;</paramtype>
  76. </parameter>
  77. <parameter name="context">
  78. <paramtype>Context const &amp;</paramtype>
  79. </parameter>
  80. <description>
  81. <para>
  82. This is an overloaded member function, provided for convenience. It differs from the above
  83. function only in what argument(s) it accepts.
  84. </para>
  85. </description>
  86. </method>
  87. </method-group>
  88. </struct>
  89. </namespace>
  90. <namespace name="result_of">
  91. <!-- proto::result_of::eval -->
  92. <struct name="eval">
  93. <template>
  94. <template-type-parameter name="Expr"/>
  95. <template-type-parameter name="Context"/>
  96. </template>
  97. <purpose>A metafunction for calculating the return type of <computeroutput>
  98. <functionname alt="proto::eval">proto::eval()</functionname></computeroutput> given a
  99. certain <computeroutput>Expr</computeroutput> and <computeroutput>Context</computeroutput> types.</purpose>
  100. <typedef name="type">
  101. <type>typename Context::template eval&lt; Expr &gt;::result_type</type>
  102. </typedef>
  103. </struct>
  104. </namespace>
  105. <!-- proto::eval() -->
  106. <overloaded-function name="eval">
  107. <signature>
  108. <type>typename <classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type>
  109. <template>
  110. <template-type-parameter name="Expr"/>
  111. <template-type-parameter name="Context"/>
  112. </template>
  113. <parameter name="expr">
  114. <paramtype>Expr &amp;</paramtype>
  115. <description>
  116. <para>The Proto expression to evaluate.</para>
  117. </description>
  118. </parameter>
  119. <parameter name="context">
  120. <paramtype>Context &amp;</paramtype>
  121. <description>
  122. <para>The context in which the expression should be evaluated.</para>
  123. </description>
  124. </parameter>
  125. </signature>
  126. <signature>
  127. <type>typename <classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type>
  128. <template>
  129. <template-type-parameter name="Expr"/>
  130. <template-type-parameter name="Context"/>
  131. </template>
  132. <parameter name="expr">
  133. <paramtype>Expr &amp;</paramtype>
  134. </parameter>
  135. <parameter name="context">
  136. <paramtype>Context const &amp;</paramtype>
  137. </parameter>
  138. </signature>
  139. <purpose>Evaluate a given Proto expression with a given context. </purpose>
  140. <returns>
  141. <para>
  142. <computeroutput>typename Context::template eval&lt;Expr&gt;()(expr, context)</computeroutput>
  143. </para>
  144. </returns>
  145. </overloaded-function>
  146. </namespace>
  147. </namespace>
  148. </header>