Locked History Actions

Choice

Choice

The Choice element is a child element of DataModel or Block. Choice elements are used to indicate any of the sub-elements are valid but only one should be selected. Much like the "C" switch statement.

<Choice name="PngChunks">
  <Block name="IHDRChunk">
    <!-- ... -->
  </Block>
  <Block name="PLTEChunk">
    <!-- ... -->
  </Block>
  <Block name="IENDChunk">
    <!-- ... -->
  </Block>
</Block>

Attributes:

  • name -- Name of the data model [optional]

  • minOccurs -- The minimum number of times this block must occur

  • maxOccurs -- The maximum number of times this block can occur

  • pointer -- (Peach 2.3) Is this a pointer to a structure (true|false), default is false [optional]

  • pointerDepth -- (Peach 2.3) How many levels of pointers (e.g. void** p is 2), default is 1 [optional]

  • mutable -- (Peach 2.3) Is data element changeable (should it be mutated), defaults to true [optional]

Valid Child-Elements: