# cxxUnionDefinition

The <cxxUnionDefinition> element is defined within <cxxUnionDetail>. <cxxUnionDefinition> represents the C++ union declaration.

## Description

A union declaration specifies a new named reference type. A union declaration can include the following members: public, protected or private, this is represented by the <cxxUnionAccessSpecifier> element.

<cxxUnionDefinition> requires the element <cxxUnionAPIItemLocation> as its child.

## Example

    <cxxUnionDefinition>
    			<cxxUnionAccessSpecifier value="public"/>
    			<cxxUnionAPIItemLocation>
    				<cxxUnionDeclarationFile name="filePath" value="C:/src/include/e32base.h"/>
    				<cxxUnionDeclarationFileLine name="lineNumber" value="2812"/>
    				<cxxUnionDefinitionFile name="filePath" value="C:/src/include/e32base.h"/>
    				<cxxUnionDefinitionFileLineStart name="lineNumber" value="2784"/>
    				<cxxUnionDefinitionFileLineEnd name="lineNumber" value="2854"/>
    			</cxxUnionAPIItemLocation>
    		</cxxUnionDefinition>

## Contained by

cxxUnionDetail

## Contains

cxxUnionAPIItemLocation cxxUnionAbstract cxxUnionAccessSpecifier cxxUnionTemplateParameters

## Content Model

(cxxUnionAccessSpecifier (optional) then cxxUnionAbstract (optional) then cxxUnionTemplateParameters (optional) then cxxUnionAPIItemLocation )

## Inheritance

topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef cxxUnion/cxxUnionDefinition

Parent topic: cxxUnion module