Attribute: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
A specialized syntax for declaring "set" and "get" methods. Method names corresponding to attributes always begin with "_set_" or "_get_". An attribute name is declared in the body of the interface statement for a class. Method procedures for get/set methods are automatically defined by the SOM Compiler unless an attribute is declared as "noget/noset". Likewise, a corresponding instance variable is automatically defined unless an attribute is declared as "nodata". IDL also supports "readonly" attributes, which specify only a "get" method. (Contrast an attribute with an instance variable.) | A specialized syntax for declaring "set" and "get" methods. Method names corresponding to attributes always begin with "_set_" or "_get_". An attribute name is declared in the body of the interface statement for a class. Method procedures for get/set methods are automatically defined by the SOM Compiler unless an attribute is declared as "noget/noset". Likewise, a corresponding instance variable is automatically defined unless an attribute is declared as "nodata". IDL also supports "readonly" attributes, which specify only a "get" method. (Contrast an attribute with an instance variable.) | ||
[[ | [[category:Glossary]] |
Revision as of 05:03, 12 November 2017
A specialized syntax for declaring "set" and "get" methods. Method names corresponding to attributes always begin with "_set_" or "_get_". An attribute name is declared in the body of the interface statement for a class. Method procedures for get/set methods are automatically defined by the SOM Compiler unless an attribute is declared as "noget/noset". Likewise, a corresponding instance variable is automatically defined unless an attribute is declared as "nodata". IDL also supports "readonly" attributes, which specify only a "get" method. (Contrast an attribute with an instance variable.)