...

This call can be used to get the used type within this ADB type.

This call can be used to get the path of an ADB type.

valueType argument to specify what type of data caller wants to get and value argument where the caller should provide a buffer, and the function will write the result to. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiGetADBValue, and it works similarly for all get-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results. The Table 2 shows what valueType can be fulfilled depending on actual model data. On success get-function will return non-zero. More precisely, according to ISO 10303-24-2001 on success they return content of value argument (*value) for sdaiADB, sdaiAGGR, or sdaiINSTANCE or value argument itself for other types (it has no useful meaning for C#). All get-functions return NULL and set value to 0 if model data are incompatible with requested valueType. Furthermore: - for unset ($) data all get-functions return NULL and set value to 0, except when valueType = sdaiEXPRESSSTRING - for derived (*), depending on engiEnableDerivedAttributes, and except valueType = sdaiEXPRESSSTRING: -- either calculate and follow these rues for calculated value -- or handles it as unset ($) - if valueType = sdaiEXPRESSSTRING and data is unset ($) or derived (*), get-function will return NULL but set value to "$" or "*" respectively for any engiEnableDerivedAttributes state

Table 1 – Required value buffer depending on valueType (on the example of sdaiGetADBValue but valid for all get-functions)

valueType               C/C++                                               C#

sdaiINTEGER             int_t val;                                          int_t val;
                        sdaiGetADBValue (ADB, sdaiINTEGER, &val);           ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiINTEGER, out val);

sdaiREAL or sdaiNUMBER  double val;                                         double val;
                        sdaiGetADBValue (ADB, sdaiREAL, &val);              ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiREAL, out val);

sdaiBOOLEAN             SdaiBoolean val;                                    bool val;
                        sdaiGetADBValue (ADB, sdaiBOOLEAN, &val);           ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiBOOLEAN, out val);

sdaiLOGICAL             const TCHAR* val;                                   string val;
                        sdaiGetADBValue (ADB, sdaiLOGICAL, &val);           ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiLOGICAL, out val);

sdaiENUM                const TCHAR* val;                                   string val;
                        sdaiGetADBValue (ADB, sdaiENUM, &val);              ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiENUM, out val);

sdaiBINARY              const TCHAR* val;                                   string val;
                        sdaiGetADBValue (ADB, sdaiBINARY, &val);            ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiBINARY, out val);

sdaiSTRING              const char* val;                                    string val;
                        sdaiGetADBValue (ADB, sdaiSTRING, &val);            ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiSTRING, out val);

sdaiUNICODE             const wchar_t* val;                                 string val;
                        sdaiGetADBValue (ADB, sdaiUNICODE, &val);           ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiUNICODE, out val);

sdaiEXPRESSSTRING       const char* val;                                    string val;
                        sdaiGetADBValue (ADB, sdaiEXPRESSSTRING, &val);     ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiEXPRESSSTRING, out val);

sdaiINSTANCE            SdaiInstance val;                                   int_t val;
                        sdaiGetADBValue (ADB, sdaiINSTANCE, &val);          ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiINSTANCE, out val);

sdaiAGGR                SdaiAggr aggr;                                      int_t aggr;
                        sdaiGetADBValue (ADB, sdaiAGGR, &aggr);             ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiAGGR, out aggr);

sdaiADB                 SdaiADB adb = sdaiCreateEmptyADB();                 int_t adb = 0;  //  it is important to initialize
                        sdaiGetADBValue (ADB, sdaiADB, adb);                ifcengine.sdaiGetADBValue (ADB, ifcengine.sdaiADB, out adb);        
                        sdaiDeleteADB (adb);

                        SdaiADB adb = nullptr;  //  it is important to initialize
                        sdaiGetADBValue (ADB, sdaiADB, &adb);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list
sdaiINTEGER         Yes         Yes *        .           .           .           .           .           .           .
sdaiREAL            Yes         Yes          .           .           .           .           .           .           .
sdaiNUMBER          Yes         Yes          .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .
sdaiSTRING          Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiUNICODE         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiEXPRESSSTRING   Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes

(Non-standard extensions) sdaiGetADBValue: sdaiADB is allowed and will success when sdaiGetADBTypePath is not NULL, returning ABD value has type path element removed.

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiPutADBValue, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiPutADBValue but valid for all put-functions)

valueType               C/C++                                                       C#

sdaiINTEGER             int_t val = 123;                                            int_t val = 123;
                        sdaiPutADBValue (ADB, sdaiINTEGER, &val);                   ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                       double val = 123.456;
                        sdaiPutADBValue (ADB, sdaiREAL, &val);                      ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                 bool val = true;
                        sdaiPutADBValue (ADB, sdaiBOOLEAN, &val);                   ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                     string val = "U";
                        sdaiPutADBValue (ADB, sdaiLOGICAL, val);                    ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                            string val = "NOTDEFINED";
                        sdaiPutADBValue (ADB, sdaiENUM, val);                       ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                            string val = "0123456ABC";
                        sdaiPutADBValue (ADB, sdaiBINARY, val);                     ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                       string val = "My Simple String";
                        sdaiPutADBValue (ADB, sdaiSTRING, val);                     ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                 string val = "Any Unicode String";
                        sdaiPutADBValue (ADB, sdaiUNICODE, val);                    ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";  string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiPutADBValue (ADB, sdaiEXPRESSSTRING, val);              ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE"); int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiPutADBValue (ADB, sdaiINSTANCE, val);                   ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                    int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                      ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiPutADBValue (ADB, sdaiAGGR, val);                       ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                   int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);   int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                  ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiPutADBValue (ADB, sdaiADB, val);                        ifcengine.sdaiPutADBValue (ADB, ifcengine.sdaiADB, val);    
                        sdaiDeleteADB (val);                                        ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

Creates an empty ADB (Attribute Data Block).

Deletes an ADB (Attribute Data Block).

valueType argument to specify what type of data caller wants to get and value argument where the caller should provide a buffer, and the function will write the result to. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiGetAggrByIndex, and it works similarly for all get-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results. The Table 2 shows what valueType can be fulfilled depending on actual model data. On success get-function will return non-zero. More precisely, according to ISO 10303-24-2001 on success they return content of value argument (*value) for sdaiADB, sdaiAGGR, or sdaiINSTANCE or value argument itself for other types (it has no useful meaning for C#). All get-functions return NULL and set value to 0 if model data are incompatible with requested valueType. Furthermore: - for unset ($) data all get-functions return NULL and set value to 0, except when valueType = sdaiEXPRESSSTRING - for derived (*), depending on engiEnableDerivedAttributes, and except valueType = sdaiEXPRESSSTRING: -- either calculate and follow these rues for calculated value -- or handles it as unset ($) - if valueType = sdaiEXPRESSSTRING and data is unset ($) or derived (*), get-function will return NULL but set value to "$" or "*" respectively for any engiEnableDerivedAttributes state

Table 1 – Required value buffer depending on valueType (on the example of sdaiGetAggrByIndex but valid for all get-functions)

valueType               C/C++                                                               C#

sdaiINTEGER             int_t val;                                                          int_t val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiINTEGER, &val);           ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiINTEGER, out val);

sdaiREAL or sdaiNUMBER  double val;                                                         double val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiREAL, &val);              ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiREAL, out val);

sdaiBOOLEAN             SdaiBoolean val;                                                    bool val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiBOOLEAN, &val);           ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiBOOLEAN, out val);

sdaiLOGICAL             const TCHAR* val;                                                   string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiLOGICAL, &val);           ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiLOGICAL, out val);

sdaiENUM                const TCHAR* val;                                                   string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiENUM, &val);              ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiENUM, out val);

sdaiBINARY              const TCHAR* val;                                                   string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiBINARY, &val);            ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiBINARY, out val);

sdaiSTRING              const char* val;                                                    string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiSTRING, &val);            ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiSTRING, out val);

sdaiUNICODE             const wchar_t* val;                                                 string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiUNICODE, &val);           ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiUNICODE, out val);

sdaiEXPRESSSTRING       const char* val;                                                    string val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiEXPRESSSTRING, &val);     ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiEXPRESSSTRING, out val);

sdaiINSTANCE            SdaiInstance val;                                                   int_t val;
                        sdaiGetAggrByIndex (aggregate, index, sdaiINSTANCE, &val);          ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiINSTANCE, out val);

sdaiAGGR                SdaiAggr aggr;                                                      int_t aggr;
                        sdaiGetAggrByIndex (aggregate, index, sdaiAGGR, &aggr);             ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiAGGR, out aggr);

sdaiADB                 SdaiADB adb = sdaiCreateEmptyADB();                                 int_t adb = 0;  //  it is important to initialize
                        sdaiGetAggrByIndex (aggregate, index, sdaiADB, adb);                ifcengine.sdaiGetAggrByIndex (aggregate, index, ifcengine.sdaiADB, out adb);        
                        sdaiDeleteADB (adb);

                        SdaiADB adb = nullptr;  //  it is important to initialize
                        sdaiGetAggrByIndex (aggregate, index, sdaiADB, &adb);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list
sdaiINTEGER         Yes         Yes *        .           .           .           .           .           .           .
sdaiREAL            Yes         Yes          .           .           .           .           .           .           .
sdaiNUMBER          Yes         Yes          .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .
sdaiSTRING          Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiUNICODE         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiEXPRESSSTRING   Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes

(Non-standard extensions) sdaiGetADBValue: sdaiADB is allowed and will success when sdaiGetADBTypePath is not NULL, returning ABD value has type path element removed.

valueType argument to specify what type of data caller wants to put Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiPutAggrByIndex, and it works similarly for all put-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results.

Table 1 – Required value buffer depending on valueType (on the example of sdaiPutAggrByIndex but valid for all put-functions)

valueType               C/C++                                                           C#

sdaiINTEGER             int_t val = 123;                                                int_t val = 123;
                        sdaiPutAggrByIndex (aggregate, index, sdaiINTEGER, &val);       ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiINTEGER, ref val);

sdaiREAL or sdaiNUMBER  double val = 123.456;                                           double val = 123.456;
                        sdaiPutAggrByIndex (aggregate, index, sdaiREAL, &val);          ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiREAL, ref val);

sdaiBOOLEAN             SdaiBoolean val = sdaiTRUE;                                     bool val = true;
                        sdaiPutAggrByIndex (aggregate, index, sdaiBOOLEAN, &val);       ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiBOOLEAN, ref val);

sdaiLOGICAL             const TCHAR* val = "U";                                         string val = "U";
                        sdaiPutAggrByIndex (aggregate, index, sdaiLOGICAL, val);        ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiLOGICAL, val);

sdaiENUM                const TCHAR* val = "NOTDEFINED";                                string val = "NOTDEFINED";
                        sdaiPutAggrByIndex (aggregate, index, sdaiENUM, val);           ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiENUM, val);

sdaiBINARY              const TCHAR* val = "0123456ABC";                                string val = "0123456ABC";
                        sdaiPutAggrByIndex (aggregate, index, sdaiBINARY, val);         ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiBINARY, val);

sdaiSTRING              const char* val = "My Simple String";                           string val = "My Simple String";
                        sdaiPutAggrByIndex (aggregate, index, sdaiSTRING, val);         ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiSTRING, val);

sdaiUNICODE             const wchar_t* val = L"Any Unicode String";                     string val = "Any Unicode String";
                        sdaiPutAggrByIndex (aggregate, index, sdaiUNICODE, val);        ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiUNICODE, val);

sdaiEXPRESSSTRING       const char* val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";      string val = "EXPRESS format, i.e. \\X2\\00FC\\X0\\";
                        sdaiPutAggrByIndex (aggregate, index, sdaiEXPRESSSTRING, val);  ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiEXPRESSSTRING, val);

sdaiINSTANCE            SdaiInstance val = sdaiCreateInstanceBN (model, "IFCSITE");     int_t val = ifcengine.sdaiCreateInstanceBN (model, "IFCSITE");
                        sdaiPutAggrByIndex (aggregate, index, sdaiINSTANCE, val);       ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiINSTANCE, val);

sdaiAGGR                SdaiAggr val = sdaiCreateAggr (inst, 0);                        int_t val = sdaiCreateAggr (inst, 0);
                        sdaiPutAttr (val, sdaiINSTANCE, inst);                          ifcengine.sdaiPutAttr (val, ifcengine.sdaiINSTANCE, inst);
                        sdaiPutAggrByIndex (aggregate, index, sdaiAGGR, val);           ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiAGGR, val);

sdaiADB                 int_t integerValue = 123;                                       int_t integerValue = 123;   
                        SdaiADB val = sdaiCreateADB (sdaiINTEGER, &integerValue);       int_t val = ifcengine.sdaiCreateADB (ifcengine.sdaiINTEGER, ref integerValue);
                        sdaiPutADBTypePath (val, 1, "IFCINTEGER");                      ifcengine.sdaiPutADBTypePath (val, 1, "IFCINTEGER");
                        sdaiPutAggrByIndex (aggregate, index, sdaiADB, val);            ifcengine.sdaiPutAggrByIndex (aggregate, index, ifcengine.sdaiADB, val);    
                        sdaiDeleteADB (val);                                            ifcengine.sdaiDeleteADB (val);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list      $ (empty)
sdaiINTEGER         Yes          .           .           .           .           .           .           .           .           .
sdaiREAL             .          Yes          .           .           .           .           .           .           .           .
sdaiNUMBER           .          Yes          .           .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .           .
sdaiSTRING           .           .           .           .           .           .          Yes          .           .           .
sdaiUNICODE          .           .           .           .           .           .          Yes          .           .           .
sdaiEXPRESSSTRING    .           .           .           .           .           .          Yes          .           .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .           .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes          .
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .

...

...

valueType argument to specify what type of data caller wants to get and value argument where the caller should provide a buffer, and the function will write the result to. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiGetAttr, and it works similarly for all get-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results. The Table 2 shows what valueType can be fulfilled depending on actual model data. On success get-function will return non-zero. More precisely, according to ISO 10303-24-2001 on success they return content of value argument (*value) for sdaiADB, sdaiAGGR, or sdaiINSTANCE or value argument itself for other types (it has no useful meaning for C#). All get-functions return NULL and set value to 0 if model data are incompatible with requested valueType. Furthermore: - for unset ($) data all get-functions return NULL and set value to 0, except when valueType = sdaiEXPRESSSTRING - for derived (*), depending on engiEnableDerivedAttributes, and except valueType = sdaiEXPRESSSTRING: -- either calculate and follow these rues for calculated value -- or handles it as unset ($) - if valueType = sdaiEXPRESSSTRING and data is unset ($) or derived (*), get-function will return NULL but set value to "$" or "*" respectively for any engiEnableDerivedAttributes state

Table 1 – Required value buffer depending on valueType (on the example of sdaiGetAttr but valid for all get-functions)

valueType               C/C++                                                           C#

sdaiINTEGER             int_t val;                                                      int_t val;
                        sdaiGetAttr (instance, attribute, sdaiINTEGER, &val);           ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiINTEGER, out val);

sdaiREAL or sdaiNUMBER  double val;                                                     double val;
                        sdaiGetAttr (instance, attribute, sdaiREAL, &val);              ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiREAL, out val);

sdaiBOOLEAN             SdaiBoolean val;                                                bool val;
                        sdaiGetAttr (instance, attribute, sdaiBOOLEAN, &val);           ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiBOOLEAN, out val);

sdaiLOGICAL             const TCHAR* val;                                               string val;
                        sdaiGetAttr (instance, attribute, sdaiLOGICAL, &val);           ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiLOGICAL, out val);

sdaiENUM                const TCHAR* val;                                               string val;
                        sdaiGetAttr (instance, attribute, sdaiENUM, &val);              ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiENUM, out val);

sdaiBINARY              const TCHAR* val;                                               string val;
                        sdaiGetAttr (instance, attribute, sdaiBINARY, &val);            ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiBINARY, out val);

sdaiSTRING              const char* val;                                                string val;
                        sdaiGetAttr (instance, attribute, sdaiSTRING, &val);            ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiSTRING, out val);

sdaiUNICODE             const wchar_t* val;                                             string val;
                        sdaiGetAttr (instance, attribute, sdaiUNICODE, &val);           ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiUNICODE, out val);

sdaiEXPRESSSTRING       const char* val;                                                string val;
                        sdaiGetAttr (instance, attribute, sdaiEXPRESSSTRING, &val);     ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiEXPRESSSTRING, out val);

sdaiINSTANCE            SdaiInstance val;                                               int_t val;
                        sdaiGetAttr (instance, attribute, sdaiINSTANCE, &val);          ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiINSTANCE, out val);

sdaiAGGR                SdaiAggr aggr;                                                  int_t aggr;
                        sdaiGetAttr (instance, attribute, sdaiAGGR, &aggr);             ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiAGGR, out aggr);

sdaiADB                 SdaiADB adb = sdaiCreateEmptyADB();                             int_t adb = 0;  //  it is important to initialize
                        sdaiGetAttr (instance, attribute, sdaiADB, adb);                ifcengine.sdaiGetAttr (instance, attribute, ifcengine.sdaiADB, out adb);        
                        sdaiDeleteADB (adb);

                        SdaiADB adb = nullptr;  //  it is important to initialize
                        sdaiGetAttr (instance, attribute, sdaiADB, &adb);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list
sdaiINTEGER         Yes         Yes *        .           .           .           .           .           .           .
sdaiREAL            Yes         Yes          .           .           .           .           .           .           .
sdaiNUMBER          Yes         Yes          .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .
sdaiSTRING          Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiUNICODE         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiEXPRESSSTRING   Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes

(Non-standard extensions) sdaiGetADBValue: sdaiADB is allowed and will success when sdaiGetADBTypePath is not NULL, returning ABD value has type path element removed.

valueType argument to specify what type of data caller wants to get and value argument where the caller should provide a buffer, and the function will write the result to. Table 1 shows type of buffer the caller should provide depending on the valueType for sdaiGetAttrBN, and it works similarly for all get-functions. Note: with SDAI API it is impossible to check buffer type at compilation or execution time and this is responsibility of a caller to ensure that requested valueType is matching with the value argument, a mismatch will lead to unpredictable results. The Table 2 shows what valueType can be fulfilled depending on actual model data. On success get-function will return non-zero. More precisely, according to ISO 10303-24-2001 on success they return content of value argument (*value) for sdaiADB, sdaiAGGR, or sdaiINSTANCE or value argument itself for other types (it has no useful meaning for C#). All get-functions return NULL and set value to 0 if model data are incompatible with requested valueType. Furthermore: - for unset ($) data all get-functions return NULL and set value to 0, except when valueType = sdaiEXPRESSSTRING - for derived (*), depending on engiEnableDerivedAttributes, and except valueType = sdaiEXPRESSSTRING: -- either calculate and follow these rues for calculated value -- or handles it as unset ($) - if valueType = sdaiEXPRESSSTRING and data is unset ($) or derived (*), get-function will return NULL but set value to "$" or "*" respectively for any engiEnableDerivedAttributes state

Table 1 – Required value buffer depending on valueType (on the example of sdaiGetAttrBN but valid for all get-functions)

valueType               C/C++                                                               C#

sdaiINTEGER             int_t val;                                                          int_t val;
                        sdaiGetAttrBN (instance, "attrName", sdaiINTEGER, &val);            ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiINTEGER, out val);

sdaiREAL or sdaiNUMBER  double val;                                                         double val;
                        sdaiGetAttrBN (instance, "attrName", sdaiREAL, &val);               ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiREAL, out val);

sdaiBOOLEAN             SdaiBoolean val;                                                    bool val;
                        sdaiGetAttrBN (instance, "attrName", sdaiBOOLEAN, &val);            ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiBOOLEAN, out val);

sdaiLOGICAL             const TCHAR* val;                                                   string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiLOGICAL, &val);            ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiLOGICAL, out val);

sdaiENUM                const TCHAR* val;                                                   string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiENUM, &val);               ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiENUM, out val);

sdaiBINARY              const TCHAR* val;                                                   string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiBINARY, &val);             ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiBINARY, out val);

sdaiSTRING              const char* val;                                                    string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiSTRING, &val);             ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiSTRING, out val);

sdaiUNICODE             const wchar_t* val;                                                 string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiUNICODE, &val);            ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiUNICODE, out val);

sdaiEXPRESSSTRING       const char* val;                                                    string val;
                        sdaiGetAttrBN (instance, "attrName", sdaiEXPRESSSTRING, &val);      ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiEXPRESSSTRING, out val);

sdaiINSTANCE            SdaiInstance val;                                                   int_t val;
                        sdaiGetAttrBN (instance, "attrName", sdaiINSTANCE, &val);           ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiINSTANCE, out val);

sdaiAGGR                SdaiAggr aggr;                                                      int_t aggr;
                        sdaiGetAttrBN (instance, "attrName", sdaiAGGR, &aggr);              ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiAGGR, out aggr);

sdaiADB                 SdaiADB adb = sdaiCreateEmptyADB();                                 int_t adb = 0;  //  it is important to initialize
                        sdaiGetAttrBN (instance, "attrName", sdaiADB, adb);                 ifcengine.sdaiGetAttrBN (instance, "attrName", ifcengine.sdaiADB, out adb);     
                        sdaiDeleteADB (adb);

                        SdaiADB adb = nullptr;  //  it is important to initialize
                        sdaiGetAttrBN (instance, "attrName", sdaiADB, &adb);
TCHAR is “char” or “wchar_t” depending on setStringUnicode. (Non-standard behavior) sdaiLOGICAL behaves differently from ISO 10303-24-2001: it expects char* while standard declares int_t. (Non-standard extension) sdiADB in C++ has an option to work without sdaiCreateEmptyADB and sdaiDeleteADB as shown in the table.
Table 2 - valueType can be requested depending on actual model data.

valueType       Works for following values in the model
                  integer      real     .T. or .F.     .U.      other enum    binary      string     instance      list
sdaiINTEGER         Yes         Yes *        .           .           .           .           .           .           .
sdaiREAL            Yes         Yes          .           .           .           .           .           .           .
sdaiNUMBER          Yes         Yes          .           .           .           .           .           .           .
sdaiBOOLEAN          .           .          Yes          .           .           .           .           .           .
sdaiLOGICAL          .           .          Yes         Yes          .           .           .           .           .
sdaiENUM             .           .          Yes         Yes         Yes          .           .           .           .
sdaiBINARY           .           .           .           .           .          Yes          .           .           .
sdaiSTRING          Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiUNICODE         Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiEXPRESSSTRING   Yes         Yes         Yes         Yes         Yes         Yes         Yes          .           .
sdaiINSTANCE         .           .           .           .           .           .           .          Yes          .
sdaiAGGR             .           .           .           .           .           .           .           .          Yes
sdaiADB             Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes         Yes

(Non-standard extensions) sdaiGetADBValue: sdaiADB is allowed and will success when sdaiGetADBTypePath is not NULL, returning ABD value has type path element removed. Technically sdaiGetAttrBN will transform into the following call
    sdaiGetAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                ),
            valueType,
            value
        );

...

This function is a specific version of sdaiGetAttrBN(..), where the valueType is sdaiSTRING. This call can be useful in case of specific programming languages that cannot map towards sdaiGetAttrBN(..) directly, this function is useless for languages as C, C++, C#, JAVA, VB.NET, Delphi and similar as they are able to map sdaiGetAttrBN(..) directly. Technically sdaiGetStringAttrBN will transform into the following call

    char    * rValue = 0;
    sdaiGetAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                ),
            sdaiSTRING,
            &rValue
        );
    return  rValue;

This function is a specific version of sdaiGetAttrBN(..), where the valueType is sdaiINSTANCE. This call can be useful in case of specific programming languages that cannot map towards sdaiGetAttrBN(..) directly, this function is useless for languages as C, C++, C#, JAVA, VB.NET, Delphi and similar as they are able to map sdaiGetAttrBN(..) directly. Technically sdaiGetInstanceAttrBN will transform into the following call

    SdaiInstance    inst = 0;
    sdaiGetAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                ),
            sdaiINSTANCE,
            &inst
        );
    return  inst;

This function is a specific version of sdaiGetAttrBN(..), where the valueType is sdaiAGGR. This call can be useful in case of specific programming languages that cannot map towards sdaiGetAttrBN(..) directly, this function is useless for languages as C, C++, C#, JAVA, VB.NET, Delphi and similar as they are able to map sdaiGetAttrBN(..) directly. Technically sdaiGetAggregationAttrBN will transform into the following call

    SdaiAggr    aggr = 0;
    sdaiGetAttr(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                ),
            sdaiAGGR,
            &aggr
        );
    return  aggr;

...

The function returns information how the attribute is declared in the schema. 'attribute' may by a base declaration received by sdaiGetAttrDefinition, engiGetEntityAttributeByIterator, etc. or redeclaration by engiGetAttrRedeclarationByIterator. 'definingEntity' is the entity which declares or re-decelerates the attribute.

...

...

...

...

Returns the model based on an instance.

Returns the entity based on an instance.

Returns the number of elements within an aggregation.

This call checks if an instance is a type of a certain given entity.

This call checks if an instance is a type of a certain given entity. Technically sdaiIsKindOfBN will transform into the following call

    sdaiIsKindOf(
            instance,
            sdaiGetEntity(
                    engiGetEntityModel(
                            sdaiGetInstanceType(
                                    instance
                                )
                        ),
                    entityName
        );

Returns primitive SDAI data type for the attribute according to schema, e.g. sdaiINTEGER In case of aggregation if will return base primitive type combined with engiTypeFlagAggr, e.g. sdaiINTEGER|engiTypeFlagAggr For SELECT it will return sdaiINSTANCE if all options are instances or aggregation of instances, either sdaiADB In case of SELECT and sdaiINSTANCE, return value will be combined with engiTypeFlagAggrOption if some options are aggregation or engiTypeFlagAggr if all options are aggregations of instances Comparing with engiGetExpressAttrType this function drills down into defined type to find base primitive type. It works for explicit and inverse attributes

Combines sdaiGetAttrDefinition and engiGetAttrType. Technically engiGetAttrTypeBN will transform into the following call

    engiGetAttrType(
            sdaiGetAttrDefinition(
                    entity,
                    attributeName
                )
        );

...

...

Returns SDAI type for actual data stored in the instance for the attribute, compare with engiGetAttrType that returns type according to schema. It may be primitive type, sdaiAGGR or sdaiADB. Returns 0 for $ and *.

Combines sdaiGetAttrDefinition and engiGetInstanceAttrType. Technically engiGetInstanceAttrTypeBN will transform into the following call

    engiGetInstanceAttrType(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                )
        );

This call checks if an instance is an exact instance of a given entity.

This call checks if an instance is an exact instance of a given entity. Technically sdaiIsInstanceOfBN will transform into the following call

    sdaiIsInstanceOf(
            instance,
            sdaiGetEntity(
                    engiGetEntityModel(
                            sdaiGetInstanceType(
                                    instance
                                )
                        ),
                    entityName
                )
        );

...

...

Technically it will transform into the following call

    sdaiValidateAttribute(
            instance,
            sdaiGetAttrDefinition(
                    sdaiGetInstanceType(
                            instance
                        ),
                    attributeName
                )
        );

...

...

...

The function returns the identifiers of all the entity instances in the defined domain that reference the specified entity instance.

The function returns the identifiers of all the entity instances in the defined domain that reference the specified entity instance by the specified attribute (role).

The function returns the identifiers of all the entity instances in the defined domain that reference the specified entity instance by the specified attribute (with roleName). Technically sdaiFindInstanceUsedInBN will transform into the following call sdaiFindInstanceUsedIn( instance, sdaiGetAttrDefinition( sdaiGetInstanceType( instance ), roleName ), domain, resultList );