Other strategy functions

You can create up to 60 nonrequired strategy functions for an operator class. This means that together with the four required functions, you can have a total of 64 strategy functions defined for a particular operator class.

For example, you might want to create a function that calculates whether one object is outside a second object. You create the Outside function in the same way you create the other required functions, except that the C code to implement the function is quite different. When you create the operator class with the CREATE OPCLASS statement, you list the Outside function as the fifth strategy function, right after the four required strategy functions.

Other types of strategy functions you might want to create include specialized Overlap and Within functions. For example, these functions could implement whether two objects overlap a lot, overlap a little, or interlock but do not touch.

The CREATE OPCLASS statement is described in Syntax for creating a new operator class.