<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><span style="color:rgb(34,34,34)">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.</span><br>
</div><div class=""><div class="h5">Best regards,<br>
Paul Ishenin<br></div></div></blockquote><div><br></div><div><div>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:</div>
<div><br></div><div>===begin code===</div><div>  // save</div><div><div>  f := TFileStream.Create(dSaveLDFM.FileName, fmCreate);</div><div>  f.Write<AnsiChar>(4, FILE_TAG[0]);</div><div>  f.Write<UInt32>(1);</div>
<div>  f.Write<TArray<string>>(FDfmDictionary.Keys.ToArray);</div><div>  f.Free;</div><div><br></div><div>  // read</div><div>  f := TFileStream.Create(dOpenLDFM.FileName, fmOpenRead);</div><div>  f.Read<AnsiChar>(4, stag);</div>
<div>  if stag <> FILE_TAG then raise EProgrammerNotFound.Create('File is corrupted');</div><div>  if f.Read<UInt32> <> 1 then raise EProgrammerNotFound.Create('Wrong file version');</div>
<div>  f.Read<TArray<string>>(LList);</div><div>  f.Free;</div></div><div style>===end code===</div><div style><br></div><div>Implemented as helpers for streams :). It will be another "stress test" for generic types, and RTTI.</div>
<div>To done this, FPC needs: </div><div><br></div><div>1. Extended RTTI (especially with attributes and <span style="font-family:arial,sans-serif;font-size:13px">access to private/protected/public members. This library don't need </span><span style="font-family:arial,sans-serif;font-size:13px">TVirtualMethodInterceptor, Invoke (but I think attributes needs Invoke :( ) and TValue</span><span style="font-size:13px;font-family:arial,sans-serif">)</span> </div>
<div>2. Fix/implementation of: <a href="http://bugs.freepascal.org/view.php?id=24254">http://bugs.freepascal.org/view.php?id=24254</a></div></div></div><div><br></div>Regards,</div><div class="gmail_extra" style>HNB</div>
</div>