[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Aggregated object
Source position: objpash.inc line 299
type TAggregatedObject = class(TObject) |
||
public |
||
constructor Create(); |
|
Create a new instance of TAggregatedObject |
property Controller: IUnknown; [r] |
|
Controlling instance |
end; |
|
Aggregated object |
|
| | ||
|
Base class of all classes. |
TAggregatedObject implements an object whose lifetime is governed by an external object (or interface). It does not implement the IUnknown interface by itself, but delegates all methods to the controller object, as exposed in the Controller property. In effect, the reference count of the aggregated object is the same as that of it's controller, and additionally, all interfaces of the controller are exposed by the aggregated object.
Note that the aggregated object maintains a non-counted reference to the controller.
Aggregated objects should be used when using delegation to implement reference counted objects: the delegated interfaces can be implemented safely by TAggregatedObject descendents.
|
Create a new instance of TAggregatedObject |
|
|
Controlling instance |