Next: , Previous: C Sequence, Up: C mappings


6.1.10 Mapping for optional types

GenoM IDL optional types map onto C structs with a _present and _value.

For instance, the following IDL:

      typedef optional< long > opt;

would map into

      typedef struct {
         bool _present;
         int32_t _value;
      } opt;

The _present member, when true, indicates the presence of valid data in _value. When _present is false, the _value should be ignored.