GetSPFFHeaderItem

This call can be used to read a specific header item, the source code example is larger to show and explain how this call can be used.

Syntax

//
//   Strong typing definition
//
int_t           GetSPFFHeaderItem(
                        SdaiModel               model,
                        int_t                   itemIndex,
                        int_t                   itemSubIndex,
                        SdaiPrimitiveType       valueType,
                        const void              ** value
                    );

static  inline  int_t   GetSPFFHeaderItem(
                                SdaiModel               model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                SdaiPrimitiveType       valueType,
                                const char              ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                SdaiModel               model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                SdaiPrimitiveType       valueType,
                                char                    ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                SdaiModel               model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                SdaiPrimitiveType       valueType,
                                const wchar_t           ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                SdaiModel               model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                SdaiPrimitiveType       valueType,
                                wchar_t                 ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}


//
//   Weak typing definition
//
int_t   __declspec(dllexport) __stdcall GetSPFFHeaderItem(
                                                int_t                   model,
                                                int_t                   itemIndex,
                                                int_t                   itemSubIndex,
                                                int_t                   valueType,
                                                const void              ** value
                                            );

static  inline  int_t   GetSPFFHeaderItem(
                                int_t                   model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                int_t                   valueType,
                                const char              ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                int_t                   model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                int_t                   valueType,
                                char                    ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                int_t                   model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                int_t                   valueType,
                                const wchar_t           ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}

static  inline  int_t   GetSPFFHeaderItem(
                                int_t                   model,
                                int_t                   itemIndex,
                                int_t                   itemSubIndex,
                                int_t                   valueType,
                                wchar_t                 ** value
                            )
{
    return  GetSPFFHeaderItem(
                    model,
                    itemIndex,
                    itemSubIndex,
                    valueType,
                    (const void**) value
                );
}
    

Property model

Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property itemIndex

Size: 64 bit / 8 byte (value)
...

Property itemSubIndex

Size: 64 bit / 8 byte (value)
...

Property valueType

Size: 64 bit / 8 byte (value)
...

Property value

Size: 64 bit / 8 byte (reference)
...

Example (based on pure API calls)

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

#include    "./include/ifcengine.h"
void    GetHeaderDescription(int_t model)
{
    wchar_t * text = 0;
    int_t   i = 0;
    if (!GetSPFFHeaderItem(model, 0, i, sdaiUNICODE, (char **) &text)) {
        while (!GetSPFFHeaderItem(model, 0, i++, sdaiUNICODE, (char **) &text)) {
            text = 0;
        }
    }
}

void    GetImplementationLevel(int_t model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 1, 0, sdaiUNICODE, (char**) &text);
}

void    GetName(__int64 model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 2, 0, sdaiUNICODE, (char**) &text);
}

void    GetTimeStamp(int_t model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 3, 0, sdaiUNICODE, (char**) &text);
}

void    GetAuthor(int_t model)
{
    wchar_t * text = 0;
    int64_t i = 0;
    if (!GetSPFFHeaderItem(model, 4, i, sdaiUNICODE, (char**) &text)) {
        while (!GetSPFFHeaderItem(model, 4, i++, sdaiUNICODE, (char**) &text)) {
            text = 0;
        }
    }
}

void    GetOrganization(int_t model)
{
    wchar_t * text = 0;
    int64_t i = 0;
    if (!GetSPFFHeaderItem(model, 5, i, sdaiUNICODE, (char**) &text)) {
        while (!GetSPFFHeaderItem(model, 5, i++, sdaiUNICODE, (char**) &text)) {
            text = 0;
        }
    }
}

void    GetPreprocessorVersion(int_t model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 6, 0, sdaiUNICODE, (char**) &text);
}

void    GetOriginatingSystem(int_t model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 7, 0, sdaiUNICODE, (char**) &text);
}

void    GetAuthorization(int_t model)
{
    wchar_t * text = 0;
    GetSPFFHeaderItem(model, 8, 0, sdaiUNICODE, (char**) &text);
}

void    GetFileSchema(int_t model)
{
    wchar_t * text = 0;
    int_t   i = 0;
    if (!GetSPFFHeaderItem(model, 9, i, sdaiUNICODE, (char **) &text)) {
        while (!GetSPFFHeaderItem(model, 9, i++, sdaiUNICODE, (char **) &text)) {
            text = 0;
        }
    }
}