- Inside Macintosh: OpenDoc Class Reference /
- Part 1 - Classes and Methods / ODPart
GetRealPart
The GetRealPart method returns a reference to a part object encapsulated by the part wrapper.
ODPart GetRealPart ();
- return value
- A reference to a part object encapsulated by the part wrapper.
DISCUSSION
Use of this method must conform to the following constraints:
- Only one client at a time may have access to the actual part. That is, clients should not hold on to a reference to the actual part object for longer than absolutely necessary; never store a reference to the part object and do not pass it as a parameter to other objects.
- Your part's
GetRealPart method increments the reference count of the returned part. When you have finished using the actual part, you should call its ReleaseRealPart method. If another client attempts to get the actual part before the ReleaseRealPart method is called, an exception is generated.
Your part's GetRealPart method is almost never called unless you really need to access the actual part.
OVERRIDING
When you subclass ODPart, you must not override this method.
EXCEPTIONS
kODErrPartNotWrapper
- This method was called on an actual part, not a part wrapper.
SEE ALSO
The ODPart::IsRealPart method (page 531).
The ODPart::ReleaseRealPart method (page 540).
"The Part-Wrapper Object" on page 464 in OpenDoc Programmer's Guide.
© Apple Computer, Inc.
17 JUL 1996