< Home

< Programming Guide

< Supported File Formats

REFERENCE MANUAL

Data Fields
A3DMiscAttributeData Struct Reference

A structure that specifies descriptive names and modeller data. More...

Data Fields

A3DUns16 m_usStructSize
 
A3DBool m_bTitleIsInt
 
A3DUTF8Charm_pcTitle
 
A3DUns32 m_uiSize
 
A3DMiscSingleAttributeDatam_pSingleAttributesData
 

Detailed Description

A structure that specifies descriptive names and modeller data.

Version
2.0

The A3DMiscAttributeData structure specifies a descriptive name as a single character string or integer. It can also reference an A3DMiscSingleAttributeData structure, which specifies modeller data.

If m_bTitleIsInt is true, m_pcTitle contains an unsigned integer (A3DUns32).

Warning
When an A3DMiscAttributeData structure references an A3DMiscSingleAttributeData structure, its members must be set as follows:
Although this structure contains an m_uiSize member, the m_pSingleAttributesData member references the structure itself, not an array of pointers to structures.

<! I removed this pseudocode from another sample because the code was misleading. –> Pseudocode to implement Attributes:

A3DVoid stSetAttributes(A3DEntity* p)
{
A3DMiscAttribute* pAttr[3];
Single.m_pcTitle = (char*) "Title";
Single.m_pcData = (char*) "Simple B-rep building demonstration";
sAttribs.m_pcTitle = Single.m_pcTitle;
sAttribs.m_pSingleAttributesData = &Single;
sAttribs.m_uiSize = 1;
A3DMiscAttributeCreate(&sAttribs, &pAttr[0]);
Single.m_pcTitle = (char*) "Author";
Single.m_pcData = (char*) "HOOPS Exchange";
sAttribs.m_pcTitle = Single.m_pcTitle;
A3DMiscAttributeCreate(&sAttribs, &pAttr[1]);
Single.m_pcTitle = (char*) "Company";
Single.m_pcData = (char*) "Tech Soft 3D";
sAttribs.m_pcTitle = Single.m_pcTitle;
A3DMiscAttributeCreate(&sAttribs, &pAttr[2]);
A3DRootBaseData sRootData;
sRootData.m_pcName = (char*) "Trimmed surface";
sRootData.m_ppAttributes = pAttr;
sRootData.m_uiSize = 3;
A3DRootBaseSet(p, &sRootData);
for(A3DUns32 i = 0; i < sRootData.m_uiSize; ++i)
{
}
}

Field Documentation

A3DUns16 A3DMiscAttributeData::m_usStructSize

Reserved; must be initialized by A3D_INITIALIZE_DATA.

A3DBool A3DMiscAttributeData::m_bTitleIsInt

A value of TRUE indicates the m_pcTitle member represents an integer.

A3DUTF8Char* A3DMiscAttributeData::m_pcTitle

Title as string.

A3DUns32 A3DMiscAttributeData::m_uiSize

Size of next array.

A3DMiscSingleAttributeData* A3DMiscAttributeData::m_pSingleAttributesData

Pointer to a single attribute structure.