deep_copy.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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/deep_copy.hpp">
  9. <para>Replace all nodes stored by reference by nodes stored by value.</para>
  10. <namespace name="boost">
  11. <namespace name="proto">
  12. <namespace name="result_of">
  13. <!-- proto::result_of::deep_copy -->
  14. <struct name="deep_copy">
  15. <template>
  16. <template-type-parameter name="Expr"/>
  17. </template>
  18. <purpose>A metafunction for calculating the return type of <computeroutput>
  19. <functionname alt="proto::deep_copy">proto::deep_copy()</functionname></computeroutput>.</purpose>
  20. <description>
  21. <para>
  22. A metafunction for calculating the return type of <computeroutput>
  23. <functionname alt="proto::deep_copy">proto::deep_copy()</functionname></computeroutput>. The type
  24. parameter <computeroutput>Expr</computeroutput> should be the type of a Proto expression tree.
  25. It should not be a reference type, nor should it be cv-qualified.
  26. </para>
  27. </description>
  28. <typedef name="type">
  29. <type><emphasis>unspecified</emphasis></type>
  30. </typedef>
  31. </struct>
  32. </namespace>
  33. <namespace name="functional">
  34. <!-- proto::functional::deep_copy -->
  35. <struct name="deep_copy">
  36. <inherit>
  37. <type><classname>proto::callable</classname></type>
  38. </inherit>
  39. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type for deep-copying Proto
  40. expression trees.</purpose>
  41. <description>
  42. <para>
  43. A <conceptname>PolymorphicFunctionObject</conceptname> type for deep-copying Proto expression trees.
  44. When a tree is deep-copied, all internal nodes and terminals held by reference are instead held by value.
  45. The only exception is function references, which continue to be held by reference.
  46. </para>
  47. </description>
  48. <struct-specialization name="result">
  49. <template>
  50. <template-type-parameter name="This"/>
  51. <template-type-parameter name="Expr"/>
  52. </template>
  53. <specialization>
  54. <template-arg>This(Expr)</template-arg>
  55. </specialization>
  56. <inherit>
  57. <type><classname>result_of::deep_copy</classname>&lt;Expr&gt;</type>
  58. </inherit>
  59. </struct-specialization>
  60. <method-group name="public member functions">
  61. <method name="operator()" cv="const">
  62. <type><classname>result_of::deep_copy</classname>&lt;Expr&gt;::type</type>
  63. <template>
  64. <template-type-parameter name="Expr"/>
  65. </template>
  66. <parameter name="expr">
  67. <paramtype>Expr const &amp;</paramtype>
  68. </parameter>
  69. <purpose>Deep-copies a Proto expression tree, turning all nodes and terminals held by
  70. reference into ones held by value.</purpose>
  71. </method>
  72. </method-group>
  73. </struct>
  74. </namespace>
  75. <!-- proto::deep_copy() -->
  76. <function name="deep_copy">
  77. <type>typename <classname>proto::result_of::deep_copy</classname>&lt;Expr&gt;::type</type>
  78. <template>
  79. <template-type-parameter name="Expr"/>
  80. </template>
  81. <parameter name="expr">
  82. <paramtype>Expr const &amp;</paramtype>
  83. </parameter>
  84. <purpose>A function for deep-copying Proto expression trees. </purpose>
  85. <description>
  86. <para>
  87. A function for deep-copying Proto expression trees. When a tree is deep-copied, all internal
  88. nodes and terminals held by reference are instead held by value.</para>
  89. </description>
  90. <notes>
  91. <para>
  92. Terminals of reference-to-function type are left unchanged.
  93. </para>
  94. <para>
  95. Equivalent to <computeroutput><classname>proto::functional::deep_copy</classname>()(expr)
  96. </computeroutput>.
  97. </para>
  98. </notes>
  99. </function>
  100. </namespace>
  101. </namespace>
  102. </header>