JVCL Help:TAggregatedPersistent
JVCL Help: TAggregatedPersistent Class
Search in JVCL Help
Search in all projectsClass Hierarchy
TAggregatedPersistent
TAggregatedPersistentEx
run\JvDataProvider.pas
Summary
Provides the functionality for an inner object of an aggregate by implementing the IInterface methods to delegate to the controlling IInterface.
Pascal
run\JvDataProvider.pas
TAggregatedPersistent = class(TPersistent);
Description
An aggregated object is an object composed of several interfaced objects. Each object implements its own behavior and interfaces, but all of the objects share the same reference count, which is that of the controller object. In the container pattern, the controller is the container object.
TAggregatedPersistent does not itself support any interfaces. However, as is typical of an aggregate, it does implement the methods of IInterface, which are used by the objects that descend from it. TAggregatedPersistent, therefore, serves as a base for classes that implement interfaces for creating objects that are part of an aggregate.
TAggregatedPersistent is used as a base for classes that create contained objects and connecting objects. Using TAggregatedPersistent ensures that calls to the IInterface methods delegate to the controlling IInterface of the aggregate.
The controlling IInterface is specified in the constructor for TAggregatedPersistent and is indicated by the Controller property.
TAggregatedPersistent is much like the VCL provided TAggregatedObject, the difference being that TAggregatedPersistent is derived from TPersistent and redeclares GetInterface as a virtual method.
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page