ilGenerateSpecializer
ilGenerateSpecializer(g_genericFunctionObj S_specSymbol l_argList)=>g_expression
Description
Returns a SKILL expression that makes an instance of the given specializer class and optionally set the slots. In the generated SKILL expression, l_argList can be used to initialize the slots.
Arguments
Value Returned
|
A SKILL expression that is to be evaluated inside |
Examples
An example of ilGenerateSpecializer using an eqv specializer to match the expected symbol. Since the generic function object is not used, it is prefixed with an underscore to prevent any impact on the SKILL Lint score and to indicate that it is unused.
defmethod(ilGenerateSpecializer (_gf (_spec (eqv 'abDbFig)) args
makeInstance('abDbFigSpecializer ?objType car(args))
Another way of implementing this is to return the code needed to generate the instance:
defmethod(ilGenerateSpecializer (_gf (_spec (eqv 'abDbFig)) args)
`makeInstance('abDbFigSpecializer ?objType ,car(args))
Related Topics
Examples of How to use Custom Specializers in SKILL++ Methods
Return to top