validateSetOptions

Allows to set a timne 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 redundent issues.

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

Property issueCntLimit

Size: 64 bit / 8 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);
}