The Talon Manual

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
<enumerations>
  <enum name="IntEnumeration" type="int">
    <const name="Value1" value="1"/>
    <const name="Value2" value="2"/>
  </enum>
  <enum name="CharEnumeration" type="char">
    <const name="Value1" value="A"/>
    <const name="Value2" value="B"/>
  </enum>
  <enum name="StringEnumeration" type="string">
    <const name="Value1" value="zero"/>
    <const name="Value2" value="one"/>
  </enum>
<enumerations> </enumerations>

Generated Enumerations can specify a type which is accessible in the generated code. The type can be int, char or String. A const should not be removed from an enumeration, if the newly generated code is expected to deserialize enums that were persisted with an earlier version, in addition the order of constants is important and should not be changed.

...