|
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><cxxFunctionParameter> |
|
28 <cxxFunctionParameterDeclaredType>const char *</cxxFunctionParameterDeclaredType> |
|
29 <cxxFunctionParameterDeclarationName>aBuf</cxxFunctionParameterDeclarationName> |
|
30 <cxxFunctionParameterDefinitionName>aBuffer</cxxFunctionParameterDefinitionName> |
|
31 <cxxFunctionParameterDefaultValue>0</cxxFunctionParameterDefaultValue> |
|
32 <apiDefNote>The buffer, default as 0.</apiDefNote> |
|
33 </cxxFunctionParameter> |
|
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> |