DITA-OT_CXX_Plugin/cxxapiref/doc/cxxFunction/cxxFunctionParameter.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="cxxFunctionParameter">
       
     8     <title>cxxFunctionParameter</title>
       
     9     <shortdesc>Describes a function parameter</shortdesc>
       
    10     <refbody>
       
    11         <section id="section_6C88CF050D7842A79A8DC78019CDFE69">
       
    12             <title>Description</title><p>This element describes a single function <i>parameter-declaration</i> in a  <i>parameter-declaration-clause</i>.</p><p>See ISO/IEC 14882:2003(E) 8.3.5 Functions [dcl.fct]</p>
       
    13         </section>
       
    14         <example id="example_C84A9A190114486A9B1B13C6B677B105">
       
    15             <title>Example</title><p>Given this code, note parameter name change between declaration and definition:</p>
       
    16             <codeblock>/**
       
    17 @param aBuf The buffer, default as 0.
       
    18 */
       
    19 void g(const char* aBuf=0);
       
    20 
       
    21 void g(const char* aBuffer)
       
    22 {
       
    23 	// Implementation
       
    24 }
       
    25             </codeblock><p>Then function <tt>g</tt> would have a <tt>cxxFunctionParameter</tt>
       
    26 element:</p>
       
    27             <codeblock>&lt;cxxFunctionParameter&gt;
       
    28   &lt;cxxFunctionParameterDeclaredType&gt;const char *&lt;/cxxFunctionParameterDeclaredType&gt;
       
    29   &lt;cxxFunctionParameterDeclarationName&gt;aBuf&lt;/cxxFunctionParameterDeclarationName&gt;
       
    30   &lt;cxxFunctionParameterDefinitionName&gt;aBuffer&lt;/cxxFunctionParameterDefinitionName&gt;
       
    31   &lt;cxxFunctionParameterDefaultValue&gt;0&lt;/cxxFunctionParameterDefaultValue&gt;
       
    32   &lt;apiDefNote&gt;The buffer, default as 0.&lt;/apiDefNote&gt;
       
    33 &lt;/cxxFunctionParameter&gt;
       
    34             </codeblock>
       
    35         </example>
       
    36         <section conref="../packagedef.dita#cxxFunctionParameter-reference/cxxFunctionParameter-containedBy-section"/>
       
    37         <section conref="../packagedef.dita#cxxFunctionParameter-reference/cxxFunctionParameter-contains-section"/>
       
    38         <section conref="../packagedef.dita#cxxFunctionParameter-reference/cxxFunctionParameter-contentModel-section"/>
       
    39         <section conref="../packagedef.dita#cxxFunctionParameter-reference/cxxFunctionParameter-attList-section"/>
       
    40         <section conref="../packagedef.dita#cxxFunctionParameter-reference/cxxFunctionParameter-classValue-section"/>
       
    41     </refbody>
       
    42 </reference>