<STRUCT> : Structure field

Java class : leon.info.LyStructFieldInfo

ROLE

A struct is a field used to group other fields. A struct is exactly like an internal class.

ATTRIBUTES

<!ATTLIST STRUCT
	  id ID #REQUIRED
	  extends IDREF #IMPLIED
	  template IDREF #IMPLIED
	  javaName NMTOKEN #IMPLIED
	  abstract ( true | false) "false"
	  className NMTOKEN #IMPLIED
	  behavior NMTOKEN #IMPLIED
	  classBehavior NMTOKEN #IMPLIED>
Attribute Mand. Description Default
id yes Identifier of the field.  
extends no Reference of the field from which this field inherits (the field must be of a complex type).  
template no Template field (must be of a complex type).  
javaName no Name of the Java attribute that corresponds to the current field when automatic code generation is used. The default value is the identifier of the current field.  
abstract no Indicates if the field is abstract. false
className no Name of the Java class representing the values for this field.  
behavior no Name of the Java class representing the behavior of this field. Reserved for a future use.  
classBehavior no Name of the Java class representing the behavior of the class associated with the structure (see leon.app.behavior.LyClassBehavior).  

ELEMENTS

<!ELEMENT STRUCT 
	  ((%A_C_BIND;)?,
	   CACHE?,
	   %FIELD_BEGIN;,
	   FIELDS*,
	   (RULE | RULE_REF)*,
	   (UNITS | UNITS_REF)?,
	   UNIT_REF?,
	   %FIELD_END;)>
Element Mand. Mult. Description
A_C_BIND
yes no Binding with the physical layer.
CACHE no no Cache policy for the structure instances.
FIELD_BEGIN
yes no Begin of the field description.
FIELDS no yes List of the fields of the complex type.
RULE yes no Rules applied when modifying the values of the fields of the structure.
RULE_REF yes no Rule references that are applied when modifying the values of the struct fields.
UNITS yes no Dictionary of units for this field.
UNITS_REF yes no Reference on a dictionary of units for this field.
UNIT_REF no no Reference of the default unit for this field. This unit must belong to the dictionary of units of the field.
FIELD_END
yes no End of the field description.

SAMPLE

<STRUCT id="userAddress">
	<NAME value="Adresse"/>
	<F_MARKS create='true' set='true'/>
	<FIELDS>
		<NUMBER id="addressNumber">
			...
		</NUMBER>
		<TEXT id="addressStreet">
			...
		</TEXT>
		<NUMBER id="addressZipCode">
			...
		</NUMBER>
		<CHOICE id="addressCountry">
			...
		</CHOICE>
	</FIELDS>
</STRUCT>