gmplPropertyStatement

Property Statement Summary

Property is a nonterminal declaration statement that occurs within Class statements and within the refactoring statement Migclass. It is also used within metalanguage class declarations and has some attributes that are only used in that context. A property has a value, but that value is maintained via three possible methods Get, Set, and Let. References to properties in the code typically can look just like references to fields, but not always. In migrating properties it is often necessary to treat the methods that actually implement the property differently.

The attributes of the Property statement are as follows:

Attribute Description
Id This attribute is the identifier of the property. It must be unique within the scope of the class containing it. The identifier is not case-sensitive.
Type This attribute is a Type attribute as discussed on the Declaration page. It specifies the type of the property.
Status This attribute is the Status attribute as discussed on the Declaration page. It specifies the various context flags to be associated with the property.
NetName This attribute is the identifier of the property to be used when declaring or referring to it in the target language.
MigName This attribute is identical to NetName. If both are used in the declaration the Migname takes precedence.
MigStatus This attribute is a MigStatus attribute as discussed on the Declaration page. It contains generalized migration settings for the property.
MigComment This deprecated string attribute associates a comment with the property. This comment does not trigger the gmNI event handlers and can interfere with the MigStatus attribute.
Default This string attribute associates a default string with the property for use in designer code. This string does not trigger the gmNI event handlers and can interfere with the MigStatus attribute.
Value This identifier attribute is used in refactoring Migclass properties to specify the property in the class being migrated that supplies the designer code value.
MigPattern This string attribute associates a surface pattern string with code references to the property. See the Patterns page for details on the content of pattern strings. It is equivalent to the All pattern.
CshPattern This string attribute associates a surface pattern string with code references to the property. See the Patterns page for details on the content of pattern strings. It is equivalent to the Csh pattern.
VbnPattern This string attribute associates a surface pattern string with code references to the property. See the Patterns page for details on the content of pattern strings. It is equivalent to the Vbn pattern.
Npram This integer attribute specifies the number of parameters associated with the surface pattern strings.
Role This attribute contains an optional keyword describing the overall role of the operation being authored via the surface pattern strings: Unknown, Property, Method, Define, Utility, Command, Constant, Function, Event, Control, Collection, Resource, Index, or Migclass. The default is None.
Patstatus An optional keyword describing the overall status of the operation authored via the surface pattern strings: Ok, Delete, Deprecated, NotImplemented, MustCorrect, NotIdent, Postfix, or NeedsPren. The default is Ok.
Canbenull This is an On/Off flag attribute. The On setting sets the CanbeNull status flag On. This means that checks of the property value for being empty can be Null as well. References to them in the intermediate code have to be checked if they are Null or Empty.
External This is an On/Off flag attribute. The On setting sets the External status flag On. This means that the property is external to the class in the target implementation to which it was assigned in the source implementation. Therefore, when authoring the identifier of the property do not precede it with its source parent membership information. The use of this attribute assumes that the MigName attribute was used as well to supply a qualified target language name.
Opcode This attribute is only used with metalanguage declarations. This entry specifies the actual opcode.subcode byte pair to be issued by references to the property as opposed to the normal reference operations.

The substatements within the Property statement are only used if one of the two Status entries GetSet or GetSetLet were specified. They are as follows:

Substatement Description
Get This substatement defines special processing to be performed for the Get operation associated with the property.
Set This substatement defines special processing to be performed for the Set operation associated with the property.
Let This substatement defines special processing to be performed for the Let operation associated with the property.

The script errors associated with the Property statement are as follows:

Error Description
1141 Property command missing required id attribute.
1142 Unable to store property vector: %1d


Table of Contents