# cxxClass

The <cxxClass> element provides the name of the C++ API class, all the elements necessary to describe the members that are introduced by the class declaration, and the members inherited from the direct base class.

## Description

The <cxxClass> element requires an ID attribute as an anchor point; this ID must always be specified. The ID attribute is referenced by the conref attribute and internal applications that refer to the <cxxClass> element content. The elements <apiName> and <cxxClassDetail> are required for this top-level container.

## Example

    <cxxClass id="class_c_array_fix_flat_3_01_t_uid_01_4">
    	<apiName>CArrayFixFlat&lt; TUid &gt;</apiName>
    	<cxxClassDetail>
    		<cxxClassDefinition>
    			<cxxClassAccessSpecifier value="public"/>
    			<cxxClassDerivations>
    				<cxxClassDerivation>
    					<cxxClassDerivationAccessSpecifier value="public"/>
    					<cxxClassBaseClass href="class_c_array_fix.xml#class_c_array_fix">CArrayFix&lt; TUid &gt;</cxxClassBaseClass>
    				</cxxClassDerivation>
    			</cxxClassDerivations>
    			<cxxClassAPIItemLocation>
    				<cxxClassDeclarationFile name="filePath" value="C:/src/include/e32base.h"/>
    				<cxxClassDeclarationFileLine name="lineNumber" value="531"/>
    				<cxxClassDefinitionFile name="filePath" value="C:/src/include/e32base.h"/>
    				<cxxClassDefinitionFileLineStart name="lineNumber" value="521"/>
    				<cxxClassDefinitionFileLineEnd name="lineNumber" value="536"/>
    			</cxxClassAPIItemLocation>
    		</cxxClassDefinition>
    		<apiDesc>
    			<p>Template specialisation base class for arrays of <xref href="class_t_uid.xml#class_t_uid">TUid</xref> types implemented in a flat dynamic buffer.</p>
    			<p>
    				<xref href="class_t_uid.xml#class_t_uid">TUid</xref> </p>
    		</apiDesc>
    	</cxxClassDetail>
    	<cxxFunction id="class_c_array_fix_flat_3_01_t_uid_01_4_1afd277b81e961b25f35b92dbc90f8d97c">
    		<apiName>SetReserveL</apiName>
    		<cxxFunctionDetail>
    			<cxxFunctionDefinition>
    				<cxxFunctionAccessSpecifier value="public"/>
    				<cxxFunctionInline/>
    				<cxxFunctionDeclaredType>void</cxxFunctionDeclaredType>
    				<cxxFunctionScopedName>CArrayFixFlat&lt; TUid &gt;</cxxFunctionScopedName>
    				<cxxFunctionPrototype>inline void SetReserveL(TInt aCount)</cxxFunctionPrototype>
    				<cxxFunctionNameLookup>CArrayFixFlat&lt; TUid &gt;::SetReserveL(TInt)</cxxFunctionNameLookup>
    				<cxxFunctionParameters>
    					<cxxFunctionParameter>
    						<cxxFunctionParameterDeclaredType>
    							<apiRelation href="e32def_8h.xml#e32def_8h_1abb88f5378e8305d934297176fe5fa298">TInt</apiRelation>
    						</cxxFunctionParameterDeclaredType>
    						<cxxFunctionParameterDeclarationName>aCount</cxxFunctionParameterDeclarationName>
    						<apiDefNote>The total number of elements for which space is to be reserved.</apiDefNote>
    					</cxxFunctionParameter>
    				</cxxFunctionParameters>
    				<cxxFunctionAPIItemLocation>
    					<cxxFunctionDeclarationFile name="filePath" value="C:/src/include/e32base.h"/>
    					<cxxFunctionDeclarationFileLine name="lineNumber" value="535"/>
    					<cxxFunctionDefinitionFile name="filePath" value="C:/src/master/sf/mw/classicui/animation/src/SpriteAnimationServer.cpp"/>
    					<cxxFunctionDefinitionFileLineStart name="lineNumber" value="1137"/>
    					<cxxFunctionDefinitionFileLineEnd name="lineNumber" value="1157"/>
    				</cxxFunctionAPIItemLocation>
    			</cxxFunctionDefinition>
    			<apiDesc>
    				<p>Reserves space in the array buffer.</p>
    				<p>If necessary, the array buffer is allocated or re-allocated so that it can accommodate the specified number of <xref href="class_t_uid.xml#class_t_uid">TUid</xref> elements.</p>
    				<p>After a successful call to this function, elements can be added to the array and the process is guaranteed not to fail for lack of memory - provided the total number of elements does not exceed the specified number.</p>
    				<p>This function does not increase the number of elements in the array; i.e. the member function <xref href="class_c_array_fix_base.xml#class_c_array_fix_base_1ad5bc874aceea074862134dc8e4937faa">CArrayFixBase::Count()</xref> returns the same value both before and after a call to this function.</p>
    				<p>
    					<b>panic</b>
    				</p>
    				<p>E32USER-CBase 27, if aCount is less than the current number of elements in the array. </p>
    			</apiDesc>
    		</cxxFunctionDetail>
    	</cxxFunction>
    	<cxxFunction id="class_c_array_fix_flat_3_01_t_uid_01_4_1a78b3dd428f88a9f9f693911129e9eb51">
    		...
    	</cxxFunction>
    	<cxxFunction id="class_c_array_fix_flat_3_01_t_uid_01_4_1a3b0a085b65c307ad4937a6c7c4bb767a">
    		...
    	</cxxFunction>
    	<cxxClassInherits>
    		<cxxClassInheritsDetail>
    			<cxxClassFunctionInherited href="class_c_array_fix.xml#class_c_array_fix_1ab18347f8849b6dfe174c57bbdccdc3a6">CArrayFix&lt; TUid &gt;::AppendL(const TUid &amp;)</cxxClassFunctionInherited>
    			<cxxClassFunctionInherited href="class_c_array_fix.xml#class_c_array_fix_1a98b10e4a4f97fd76a722e33afd3b8ee3">CArrayFix&lt; TUid &gt;::AppendL(const TUid &amp;,TInt)</cxxClassFunctionInherited>
    			...
    		</cxxClassInheritsDetail>
    	</cxxClassInherits>
    </cxxClass>

## Contained by

## Contains

apiName, cxxClassDetail cxxClassInherits cxxClassNested cxxDefine cxxEnumeration cxxFunction cxxTypedef cxxVariable prolog, related-links, shortdesc,

## Content Model

(apiName, then shortdesc, then prolog, then cxxClassDetail then related-links, then ((cxxClassNested or cxxFunction or cxxDefine or cxxVariable or cxxEnumeration or cxxTypedef (any number) ) ) then cxxClassInherits (any number) )

## Inheritance

topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier cxxClass/cxxClass

Parent topic: cxxClass module