6.6.6 Storage information

The stored specifier should be either a boolean constant, a boolean field of the class, or a parameterless function which returns a boolean result. This specifier has no result on the class behaviour. It is an aid for the streaming system: the stored specifier is specified in the RTTI generated for a class (it can only be streamed if RTTI is generated), and is used to determine whether a property should be streamed or not: it saves space in a stream. It is not possible to specify the ’Stored’ directive for array properties.

The default specifier can be specified for ordinal types and sets. It serves the same purpose as the stored specifier: properties that have as value their default value, will not be written to the stream by the streaming system. The default value is stored in the RTTI that is generated for the class. Note that

  1. When the class is instantiated, the default value is not automatically applied to the property, it is the responsibility-g of the programmer to do this in the constructor of the class.
  2. The value 2147483648 cannot be used as a default value, as it is used internally to denote nodefault.
  3. It is not possible to specify a default for array properties.

The nodefault specifier (nodefault) must be used to indicate that a property has no default value. The effect is that the value of this property is always written to the stream when streaming the property.