Previous | Table of Contents | Next |
(130) <home_body> ::= “{? <home_export>* “}?
(131) <home_export ::= <export>| <factory_dcl> “;?| <finder_dcl> “;?
3.18.3.1 Operation Declarations
A home body may include zero or more operation declarations, where the operation may be a factory operation, a finder operation,
or a normal operation or attribute.
Factory operations
The syntax of a factory operation is as follows:
(132) <factory_dcl> ::= “factory? <identifier> “(“ [ <init_param_decls> ] “)? [ <raises_expr> ]
A factor operation declaration consists of the following elements:
• the keyword factory
•an <identifier> that names the operation in the scope of the home declaration
• an optional list of initialization parameters (<init_param_decls>) enclosed in parentheses
• an optional <raises_expr> declaring exceptions that may be raised by the operation A factory declaration has an implicit return value of type reference to component.
(133)