|
addMethod
|
The addMethod function associates a method {proc} to the specified type {type}
that responds to a nessage {msgName}.
This function is instrumental in providing Analytic Information Server with support for
standard Object Oriented Programming features. After the addMethod associates
a method {methodName} with the specified type {type}, the {methodName}
can be used as if it was a native Analytic Information Server function for a that type. The Analytic Information Server Lisp compiler constructs a method binding from the
{methodName} argument and the Lambda object defined in the argument {proc}.
The new method binding is installed in the methods Dictionary associated with the
specified type {type}. In summary, the defmethod creates a new method
binding for a type (can be any Analytic Information Server type or user defined type) .
The addmethod function returns the Methods Dictionary object. When to use Use the addMethod function to define a method (Lambda) that operates differently on
Strings than it does on other types. This allows the standard type polymorphism of standard
Object Oriented Programming (OOP). Analytic Information Server supports both standard OOP type
polymorphism and Lambda polymorphism.
Methods Dictionary
MsgName1 LambdaName1 MsgName2 LambdaName2 MsgName3 LambdaName3
(addMethod VectorType: msgName proc) The Methods Dictionary for {typeName}
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ShortVector_addMethod_021
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types VectorType: Mandatory keyword for specifying the Vector methods table. It may be a
Vector or any of its subtypes (e.g. Vector:, NumVector:, IntVector:, ...) CpxVector FltVector IntVector NumVector ObjVector PcodeVector BitVector ShortVector msgName A symbolic name of the message Symbol proc The proc to be installed ---
Returns:
Examples
Argument Types
How do I contact the AIS team?