![]() ![]() Simply walking through it will give you an access to property/method information. List will also include published methods. ![]() function GetPropList(TypeInfo: PTypeInfo out APropList: PPropList): integer Ī function will return number and reference to the list (array) of properties published (public and published) by the class ( VMT information). To be able to work within RTTI, you need to operate on the object which has published and public properties. There is a very powerful infrastructure available to do full serialization without knowing underlying class structure – RTTI (Run-time Type Information).Īll functions we would be looking at are defined in TypInfo.pas unit.įirst thing first. But it only works between inherited classed which know about each other.Ĭan we find there something which will allow to pass objects states in more readable format? Assign method would work if you are coping data from one instance to another. It can be then read back using appropriate counterpart ReadComponent/ReadComponentRes.ĭepend on your situation, simply calling. Only closest option in Delphi is to stream the component using WriteComponent/WriteComponentRes of TStream/TWriter (used for Form storage as DFM, for example). Net to able serialize/deserialize any serializable object instance. It has been a very lean and easy option of. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |