Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 22876, OO framework with Interfaced based metadata

by Iman Crawford Email: Anonymous


OO framework with interface based metadata. Idea resembles TFields for TDataSets.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 6.0  to 6.0 308 downloads
Copyright: Open Source or other


Size: 16,594 bytes
Updated on Sat, 11 Dec 2004 10:08:22 GMT
Originally uploaded on Fri, 10 Dec 2004 14:44:02 GMT
SHA1 Hash: 3AF4095762B21513F037D9D7FBF30C6EE718F232
MD5 Hash: 4711A671DE336FD1504BCC2626C89DAB

    Explore the files in this upload

Description
This is a concept framework to have the properties of an object be described by an interface (see Properties.pas). The entire framework is built on interfaces, as a learning experience in using interfaces. The IProperties interface works similarly to the TFields class. You should be able to set/get values of a property by doing something like:

myProps := curIntf as IProperties;
myProps.PropertyByName('PropertName').AsString := 'test';

For convenience a TDefaultObject (ObjectList.pas) class is provided to act as an abstract base class for your own objects. It handles all the details of implementing IProperties. Just derive your own class from TDefaultObject. An implementation of an ObjectList is included in ObjectList.pas. It is also an abstract base class that implements IObjectList. Just derive your own class from it. See TestObject.pas for an example.

Like I said this is a concept framework that I was playing around with. I am putting this in CodeCentral at the request of an individual in borland.public.delphi.oodesign news group. Any questions and all critiques are welcome in that news group. I don't monitor the messages on CodeCentral at all. I'm releasing this under BSD license, it would be nice (but not a requirement), if you let me know if you use this in production.

FYI, this should work in all version of Delphi.Win32. I only have D6 to test on. It won't work in Delph.net. I used the implements keyword quite a bit.

Iman L Crawford
ilcrawford@hotmail.com

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03