StandardStructureDefinition ::= (MemberVariableDeclarations |
MemberFunctionDeclaration)*
If the structure is derived, it is not necessary to have any
member variable declaration. If the structure is not
derived, at least one member variable declaration
must appear.
If any member variable is a pointer or array of pointers, or if
any member variable is declared with a structured type specifier when that structure
contains pointers, the structure is considered to have
pointers. The BAR engine explicitly forbids structures
containing pointers from residing in a deserialized file
as node data. Such a structure can, however, appear as
global data.
MemberVariableDeclarations ::= (DataStructureType | ‘void’) S
VariableDeclaration (S? ‘,’ S? VariableDeclaration)* S? ‘;’
Initial values to member variables are physically stored in the
initial value table based on the order they are
declared. No automatic type alignment of data
on a specific boundary is assumed; padding is never implicit for member
variables.
The variable type identifies the base type of the
variable. The type is either a keyword representing one
of the built-in simple types (void, char,
short, long, longlong, float,
or double) or an identifier for a data
structure name. If the void type is used, an asterisk
is required to qualify the type as a void pointer.
The variable name uniquely identifies the variable. The
name is an identifier that has not appeared earlier in the
file as a construct name, an enumerated constant block
name, an enumerated constant name, a member
variable name, or a member function name.
If brackets appear following the variable name,
this identifies the variable as an array of the given type (or
array-of-pointer to the given type, if an asterisk appeared).
If only one set of brackets appears, the array has one
dimension. The element count inside the
brackets must be a valid constant. If the element count is left out,
an initializer must appear (because the array is implicitly
sized).
If two sets of brackets appears, the array has two
dimensions. Both element counts must be
present within the brackets, and both valid constants.
An equals symbol is optional; an initializer follows the
symbol if present. The initializer follows
the format described here. If no
initializer is present, the variable defaults to zero
(for scalar contents) or null
(for pointer contents).
See also: [Standard structure
definitions] [Bit field structure
definitions] [Derived-from-simple structure
definitions]
|