Studio:Scl union activate: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
(New page: = The scl_union_activate pragma = The scl_union_activate pragma provides a means to map discriminant values to specific union members. It can only apply to discriminated unions that have ...)
 
No edit summary
Line 37: Line 37:


== See Also ==
== See Also ==
: [[scl_union]]
* The [[scl_union]] pragma page.
* For additional information on the scl_union_activate pragma, including constraints, refer to the section on scl_union_activate in the [[http://www.s2technologies.com/pdf/s2sSCLReferenceGuide.pdf SCL Reference Guide]].
 
[[Category: SCL_Reference]]

Revision as of 18:01, 16 July 2008

The scl_union_activate pragma

The scl_union_activate pragma provides a means to map discriminant values to specific union members. It can only apply to discriminated unions that have been identified by the scl_union pragma.

A single scl_union_activate pragma prescribes the set of values for the discriminant and the member that is active for those values.

Syntax

#pragma scl_union_activate(container-specifier, union-member-specifier, constant-value-list)
Parameters Type Description
container-specifier Type Name of the structure encapsulating the union
union-member-specifier Member The active member of the union
constant-value-list Integer constant expression list List of the constant expressions that the discriminant takes on to activate the union member identified in this pragma

Notes

  • The discriminant field use in scl_union_activate must have already been identified with scl_union.

Examples

Use the following links to the scl_union page to see examples of the scl_union_activate pragma:

See Also

  • The scl_union pragma page.
  • For additional information on the scl_union_activate pragma, including constraints, refer to the section on scl_union_activate in the [SCL Reference Guide].