Chapter 4, "Extending an Operator Class," describes how you can extend an operator class to provide additional functionality for a secondary access method (an index).
Chapter 5, "Creating an Opaque Data Type," provides the steps for the creation of an opaque data type, a user-defined data type for which you must provide both the internal structure and the functions that operate on this structure.