By using USECLASS/ENDUSECLASS statements around an SCL method block, you
can use methods and attributes for the specified class without repeating the class
identifier. Due to compile-time binding, the SCL compiler
can distinguish between local variables and class attributes. Refer to the SAS Component Language: Reference for
complete details on the USECLASS statement.
You can also use the _super() routine in the implementation of a method that is contained
in a USECLASS statement block without having to specify the object identifier.
-
Your method can execute the _super() routine without specifying a super or parent
method. The SCL compiler assumes that you want to execute the method of the same name
on the parent.
For example, to override an _init method:
init: public method;
_super(); /* run _init method on parent */
/* ...insert additional code here... */
endmethod;
Note: So that any new properties
you have added are saved with a class, be sure to save a CLASS entry
before compiling the SCL entry that contains its method implementation(s).
If you override a method that has a signature of '(None)' and implement the method
inside a USECLASS/ENDUSECLASS block, you must
include a signature designation in the METHOD statement. For example, if you override
the _foo method and _foo has a signature of '(None)', your SCL code could include
USECLASS mylib.mycat.myclass.class;
foo: method/(signature='N');
/* ...insert additional code here... */
endmethod;
enduseclass;
Any method that is implemented within a
USECLASS/ENDUSECLASS block must designate a signature.