JVCL Help:TExtensibleInterfacedPersistent

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Class Hierarchy

TExtensibleInterfacedPersistent
TJvBaseDataContext
TJvBaseDataContexts
TJvBaseDataItem
TJvBaseDataItems
TJvDataConsumer
run\JvDataProvider.pas


Summary

Ancestor for persistent objects that implement interfaces and can be extended at run time.

run\JvDataProvider.pas


Pascal

 run\JvDataProvider.pas
 TExtensibleInterfacedPersistent = class(TPersistent, IUnknown);


Description

TExtensibleInterfacedPersistent, like its ancestor, provides functionality to read and write its to and from a stream. In addition, like the Delphi provided TInterfacedPersistent, it also supplies a default implementation for the IInterface methods.
Furthermore, TExtensibleInterfacedPersistent allows itself to be extended through aggregators, where the interfaced supported by those aggregators are directly accessible from the main object, as well as from each other. The aggregators must be derived from TAggregatedPersistentEx for this behavior to work correctly. In addition, TExtensibleInterfacedPersistent automatically provides semi properties that allow the extensions to be read and written from and to a stream.
This extensibility is achieved by having the QueryInterface method of IInterface call the redeclared and virtual GetInterface method. This method will simply call the Delphi provided implementation and if a match is not found, the aggregators (called "extensions" in this context) are iterated until an extension is found that supports the interface. The first match is returned (this implies that if multiple extension happen to share a common interface, only the first added extension will be returned).

run\JvDataProvider.pas


See Also

TAggregatedPersistentEx

run\JvDataProvider.pas


About

Navigation

run\JvDataProvider.pas



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