Skip to content

gmplPropertyStatement

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:

AttributeDescription
IdThis 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.
TypeThis attribute is a Type attribute as discussed on the Declaration page. It
specifies the type of the property.
StatusThis attribute is the Status attribute as discussed on the Declaration page. It
specifies the various context flags to be associated with the property.
NetNameThis attribute is the identifier of the property to be used when declaring or referring to it
in the target language.
MigNameThis attribute is identical to NetName. If both are used in the declaration the Migname
takes precedence.
MigStatusThis attribute is a MigStatus attribute as discussed on the Declaration page. It
contains generalized migration settings for the property.
MigCommentThis 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.
DefaultThis 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.
ValueThis identifier attribute is used in refactoring Migclass properties to specify the property
in the class being migrated that supplies the designer code value.
MigPatternThis 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.
CshPatternThis 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.
VbnPatternThis 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.
NpramThis integer attribute specifies the number of parameters associated with the surface pattern strings.
RoleThis 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.
PatstatusAn 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.
CanbenullThis 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.
ExternalThis 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.
OpcodeThis 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:

SubstatementDescription
GetThis substatement defines special processing to be performed for the Get operation associated
with the property.
SetThis substatement defines special processing to be performed for the Set operation associated
with the property.
LetThis 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:

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