engiGetAggrType

...

Syntax

//   Visual Studio for Windows
public:
void __declspec(dllexport) __stdcall engiGetAggrType(
            __int64 * aggregate,
            __int64 * aggragateType
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
void engiGetAggrType(
            int64_t * aggregate,
            int64_t * aggragateType
        );    

Property aggregate

Size: 64 bit / 8 byte (value)
Handle of an aggregation (i.e. sorted collection).

Property aggragateType

Size: 64 bit / 8 byte (reference)
Type of the aggregation, for example sdaiINSTANCE, sdaiREAL, ...

Examples

Here you can find code snippits that show how the API call engiGetAggrType can be used.

void    WriteAttribute(__int64 ifcInstance, char * attributeName, __int64 attributeType)
{
    switch  (attributeType) {
        case  sdaiAGGR:
            {
                __int64	* aggregate = 0;
                sdaiGetAttrBN(ifcInstance, (char*) attributeName, sdaiAGGR, &aggregate);
                if  (aggregate) {
                    __int64 cnt = sdaiGetMemberCount(aggregate);
                    for  (__int64 i = 0; i < cnt; i++) {
                        __int64 aggregateType = 0;
                        engiGetAggrType(aggregate, &aggregateType);
                        switch  (aggregateType) {
                            case  sdaiSTRING:
                                {
                                    char    * value = 0;
                                    engiGetAggrElement(aggregate, i, sdaiSTRING, &value);
                                    ...
                                }
                                break;

                            ...

                            default:
                                break;
                        }
                    }
                }
            }
            break;

        ...

        default:
            break;
    }
}

void    WriteAttributes(__int64 ifcInstance)
{
    __int64 ifcEntity = sdaiGetInstanceType(ifcInstance),
            attributeCnt = engiGetEntityNoArguments(ifcEntity);

    for  (__int64 i = 0; i < attributeCnt; i++) {
        __int64 attributeType = 0;
        char    * attributeName = 0;
        engiGetEntityArgumentName(ifcEntity, i, sdaiSTRING, &attributeName);
        engiGetEntityArgumentType(ifcEntity, i, &attributeType);
        WriteAttribute(ifcInstance, attributeName, attributeType);
    }
}