validateSetOptions

Allows to set a time limit in seconds, setting to 0 means no time limit. Allows to set a count limit, setting to 0 means no count limit. Allows to hide redundant issues.

    bit 0:  (__KNOWN_ENTITY)                    entity is defined in the schema
    bit 1:  (__NO_OF_ARGUMENTS)                 number of arguments
    bit 2:  (__ARGUMENT_EXPRESS_TYPE)           argument value is correct entity, defined type or enumeration value
    bit 3:  (__ARGUMENT_PRIM_TYPE)              argument value has correct primitive type
    bit 4:  (__REQUIRED_ARGUMENTS)              non-optional arguments values are provided
    bit 5:  (__ARRGEGATION_EXPECTED)            aggregation is provided when expected
    bit 6:  (__AGGREGATION_NOT_EXPECTED)        aggregation is not used when not expected
    bit 7:  (__AGGREGATION_SIZE)                aggregation size
    bit 8:  (__AGGREGATION_UNIQUE)              elements in aggregations are unique when required
    bit 9:  (__COMPLEX_INSTANCE)                complex instances contains full parent chains
    bit 10: (__REFERENCE_EXISTS)                referenced instance exists
    bit 11: (__ABSTRACT_ENTITY)                 abstract entity should not instantiate
    bit 12: (__WHERE_RULE)                      where-rule check
    bit 13: (__UNIQUE_RULE)                     unique-rule check
    bit 14: (__STAR_USAGE)                      * is used only for derived arguments
    bit 15: (__CALL_ARGUMENT)                   validateModel / validateInstance function argument should be model / instance
    bit 63: (__INTERNAL_ERROR)                  unspecified error

Syntax

//
//   Strong typing definition
//
void            validateSetOptions(
                        int_t                   timeLimitSeconds,
                        int_t                   issueCntLimit,
                        bool                    showEachIssueOnce,
                        uint64_t                issueTypes,
                        uint64_t                mask
                    );


//
//   Weak typing definition
//
void    __declspec(dllexport) __stdcall   validateSetOptions(
                                                                        int_t                   timeLimitSeconds,
                                                                        int_t                   issueCntLimit,
                                                                        bool                    showEachIssueOnce,
                                                                        uint64_t                issueTypes,
                                                                        uint64_t                mask
                                                                    );
    

Property timeLimitSeconds

Size: 32 bit / 4 byte (value)
???.

Property issueCntLimit

Size: 32 bit / 4 byte (value)
???.

Property showEachIssueOnce

Size: 8 bit / 1 byte (value)
???.

Property issueTypes

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

Property mask

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

Example (based on pure API calls)

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

#include    "./include/ifcengine.h"
#include    <assert.h>


void    UsageExample(
            SdaiModel   model
        )
{
    //  set options if needed
    validateSetOptions(
            10,     //  limit validation processing to work for 10 seconds
            100,        //  limit validation processing to find 100 issues
            0,
            enum_validation_type::__WHERE_RULE  //  exclude where rules check
        );

    ValidationResults   results = validateModel(model);

    for (ValidationIssue issue = validateGetFirstIssue(results); issue; issue = validateGetNextIssue(issue)) {
        SdaiInstance    inst = validateGetInstance(issue);
        const char      * desc = validateGetDescription(issue);
        ... 
    }

    if (validateGetStatus(results)!=enum_validation_status::__COMPLETE_ALL) {
        printf("There may be more issues, increase limits\n");
    }

    validateFreeResults(results);
}