DITA-OT_CXX_Plugin/cxxapiref/doc/cxxFunction/cxxFunctionTemplateParameters.dita
changeset 4 468f4c8d3d5b
equal deleted inserted replaced
3:d8fccb2cd802 4:468f4c8d3d5b
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <!--
       
     3 Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 All rights reserved.		
       
     5 		-->
       
     6 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
       
     7 <reference xml:lang="en-us" outputclass="element" id="cxxFunctionTemplateParameters">
       
     8     <title>cxxFunctionTemplateParameters</title>
       
     9     <shortdesc>Collects together the template parameters for template functions.</shortdesc>
       
    10     <refbody>
       
    11         <section id="section_BB16EAA97F01427CAFFFB15C63DEAC8D">
       
    12             <title>Description</title><p>Collects together the template parameters for template functions.</p><p>See ISO/IEC 14882:2003(E) 14.1 Template parameters [temp.param]</p>
       
    13         </section>
       
    14         <example id="example_7637310D62AB4BDB88913D5B7CC94BDC">
       
    15             <title>Example</title><p>Given this code:</p>
       
    16             <codeblock>/**
       
    17  @tparam T The type of the first function object.
       
    18  @tparam U The type of the second function object.
       
    19  @return 1 on success, 0 on failure.
       
    20  */
       
    21 template&lt;typename T, typename U&gt;
       
    22 int templateFunction(T&amp; x, U&amp; y)
       
    23 {
       
    24 } 
       
    25             </codeblock><p>Then function <tt>templateFunction
       
    26                 </tt> would have the <tt>cxxFunctionTemplateParameters</tt>
       
    27 element:</p>
       
    28             <codeblock>&lt;cxxFunctionTemplateParameters&gt;
       
    29   &lt;cxxFunctionTemplateParameter&gt;
       
    30     &lt;cxxFunctionTemplateParameterType&gt;typename T&lt;/cxxFunctionTemplateParameterType&gt;
       
    31     &lt;apiDefNote&gt;The type of the first function object. &lt;/apiDefNote&gt;
       
    32   &lt;/cxxFunctionTemplateParameter&gt;
       
    33   &lt;cxxFunctionTemplateParameter&gt;
       
    34     &lt;cxxFunctionTemplateParameterType&gt;typename U&lt;/cxxFunctionTemplateParameterType&gt;
       
    35     &lt;apiDefNote&gt;The type of the second function object. &lt;/apiDefNote&gt;
       
    36   &lt;/cxxFunctionTemplateParameter&gt;
       
    37 &lt;/cxxFunctionTemplateParameters&gt;
       
    38             </codeblock><p>If the mandatory attributes are present they must be set thus:</p>
       
    39             <codeblock>&lt;cxxFunctionStorageClassSpecifierExtern name="extern" value="extern"/&gt;</codeblock>
       
    40         </example>
       
    41         <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-containedBy-section"/>
       
    42         <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-contains-section"/>
       
    43         <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-contentModel-section"/>
       
    44         <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-attList-section"/>
       
    45         <section conref="../packagedef.dita#cxxFunctionTemplateParameters-reference/cxxFunctionTemplateParameters-classValue-section"/>
       
    46     </refbody>
       
    47 </reference>