> > Sven, I did not ask what and how delphi implemented. I asked Maciej Izak > what he wants from extended RTTI. Maybe this is a small subset which is not > very hard to implement. > Best regards, > Paul Ishenin >
Unfortunately, Sven is right :). I need this to share another free library for FPC. It was originally intended for sale to the Embarcadero. Absolute automatic binary streaming (seriously, for each type that exists in Pascal, including Class, ClassRef, Interfaces, Pointers, menaged records with help of attributes). Small demo: ===begin code=== // save f := TFileStream.Create(dSaveLDFM.FileName, fmCreate); f.Write<AnsiChar>(4, FILE_TAG[0]); f.Write<UInt32>(1); f.Write<TArray<string>>(FDfmDictionary.Keys.ToArray); f.Free; // read f := TFileStream.Create(dOpenLDFM.FileName, fmOpenRead); f.Read<AnsiChar>(4, stag); if stag <> FILE_TAG then raise EProgrammerNotFound.Create('File is corrupted'); if f.Read<UInt32> <> 1 then raise EProgrammerNotFound.Create('Wrong file version'); f.Read<TArray<string>>(LList); f.Free; ===end code=== Implemented as helpers for streams :). It will be another "stress test" for generic types, and RTTI. To done this, FPC needs: 1. Extended RTTI (especially with attributes and access to private/protected/public members. This library don't need TVirtualMethodInterceptor, Invoke (but I think attributes needs Invoke :( ) and TValue) 2. Fix/implementation of: http://bugs.freepascal.org/view.php?id=24254 Regards, HNB
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel