// Generated from ids.y - manual changes will be lost
ifdef::sidebartoc[]
include::_Sidebar.adoc[]
endif::[]


























IDS declaration
---------------

The `ids` declaration declares a private, internal data structure.

The internal data structure stores global data shared by the services.
Access to this structure is controlled by Genom, that takes care of the
proper synchronization between concurrent access.

An IDS definition is similar to a `struct` definition, and follows this
syntax:

****
[horizontal]
(19) `*ids                   ::=*` ::
   <<grammar#dotgen-rule-ids-name,`ids-name`>> `"{"` <<grammar#dotgen-rule-member-list,`member-list`>> `"}"` `";"`
(20) `*ids-name              ::=*` ::
   `"ids"`
(96) `*member-list           ::=*` ::
   `{` <<grammar#dotgen-rule-member,`member`>> `";"` `}` <<grammar#dotgen-rule-member,`member`>> `";"`
(97) `*member                ::=*` ::
   `(` <<grammar#dotgen-rule-type-spec,`type-spec`>> +
                              `|` <<grammar#dotgen-rule-member,`member`>> `","` `)` <<grammar#dotgen-rule-declarator,`declarator`>>
****

The major difference with a regular `struct` is that an `ids` declaration
can be reopened. Thus, several `ids` statements can be used to define an
internal structure by independent chunks. This is useful for instance in
case of included files.

=== Example

This would define the `ids` for the component `foo`, using two separate
declarations:

[source,C]
----
component foo {
  ids {
    long state;
  };

  ids {
    double position;
    double velocity;
  };
};
----



















// eof
