PresenceConstraints: generate code for the value validation type handlers
Created by: viktorTarasov
General idea is to extend the typed value descriptors (TTCN_Typedescriptor_t) with the type specific validator function.
The value validator is called at the begining of 'XXX_encode()' function and at the end of 'XXX_decode()'.
The core of this validator is generated from the recursive analyse of the type's sub-type asn-constraints.
Currently the main attention was for the constraint chains at the end of which there is a NamedConstraint with the valid 'Presence' value ('ABSENT' and 'PRESENT').
Tested with the EtsiTs103097Module, IEEE1609dot2 and IEEE1609dot2BaseTypes ASN1 schemas.
In these shemas constraint chains contains the following constraint types:
ContainedSubtypeConstraint
SetOperationConstraint
SingleInnerTypeConstraint
NamedConstraint
MultipleInnerTypeConstraint
UnparsedMultipleInnerTypeConstraint
Still needs the exhaustive functional tests. I will do it using the test cases based onto the ASN1 sources listed above. But before I would like to understand if, with this proposed implementation I'm moving in the right direction.
Regards,