Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods


ParameterSet

Superclasses
ODRefCntObject --> ODObject
Subclasses
none
An object of the ParameterSet class manages a heterogeneous collection of parameters.

Description

The ParameterSet class is a Cyberdog class that maintains pointers to a heterogeneous collection of objects. A parameter set is a general purpose object; you can use a parameter set in any way you want. In Cyberdog, a parameter set is used to keep track of the variety of cooperating objects that may play a role during the opening of a Cyberdog item.

A parameter set encapsulates an arbitrary number of parameters. Each parameter has a name or parameter key that identifies it. Cyberdog defines some parameter keys (page 171); developers can define additional parameter keys.

When used for opening a Cyberdog item, a parameter set contains pointers to parameters that may affect the behavior of the opening Cyberdog item or the display part created to display the content referenced by the Cyberdog item, including:

The CyberItem::Open method takes one parameter, a ParameterSet object. You add parameters that may be used during the opening process to the set before calling CyberItem::Open. For more information about how a parameter set is used during the opening of a Cyberdog item, see "Cyberdog Item Opening Process" (page 66).

You add a parameter to a ParameterSet object by calling the PutParameter method, passing the parameter's key and a pointer to a destructor function for the parameter. A ParameterSet object is a reference-counted object; when a ParameterSet object's reference count becomes 0, each parameter in the parameter set is destroyed, and the ParameterSet object is deleted.

In addition, the ParameterSet class defines several methods that return pointers to implemented destructor functions for various types of objects. For example, GetODPtrDestructor returns an implemented destructor function for an ODPtr object. These methods return Universal Procedure Pointers (UPP) rather than simple C/Pascal function pointers.

Methods

This section presents summary descriptions of the ParameterSet methods grouped according to purpose, followed by detailed descriptions.

Initialization and Cleanup

IParameterSet
Initializes this parameter set.
Managing Parameters

ExtractParameter
Removes the specified parameter from this parameter set without calling the parameter's destructor.
GetParameter
Retrieves the specified parameter from this parameter set.
PutParameter
Adds the specified parameter to this parameter set.
RemoveParameter
Removes the specified parameter from this parameter set and calls the parameter's destructor.
Parameter Destructors

GetODHandleDestructor
Retrieves a destructor for an ODHandle object.
GetODPtrDestructor
Retrieves a destructor for an ODPtr object.
GetODRefCntObjectDestructor
Retrieves a destructor for a reference-counted object.
GetSOMObjectDestructor
Retrieves a destructor for a SOM object.

Methods
ExtractParameter
GetODHandleDestructor
GetODPtrDestructor
GetODRefCntObjectDestructor
GetParameter
GetSOMObjectDestructor
IParameterSet
PutParameter
RemoveParameter

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996