Re: [fpc-pascal] Streaming of Generics

2012-05-29 Thread kyan
Ideally, I'd only like to write the streaming mechanism for each set of types (normal, anisstring, dynamic array, objects, interfaced objects) once, and use it for every set of items. However, there's no reasonable way to detect the type and do an execution for it. Ideally You can use the

Re: [fpc-pascal] Streaming of Generics

2012-05-29 Thread Kornel Kisielewicz
On Tue, May 29, 2012 at 10:40 AM, kyan alfasud...@gmail.com wrote: Ideally, I'd only like to write the streaming mechanism for each set of types (normal, anisstring, dynamic array, objects, interfaced objects) once, and use it for every set of items. However, there's no reasonable way to

Re: [fpc-pascal] Streaming of Generics

2012-05-29 Thread Sven Barth
Am 29.05.2012 12:24, schrieb Kornel Kisielewicz: On Tue, May 29, 2012 at 10:40 AM, kyanalfasud...@gmail.com wrote: Ideally, I'd only like to write the streaming mechanism for each set of types (normal, anisstring, dynamic array, objects, interfaced objects) once, and use it for every set of

Re: [fpc-pascal] Streaming of Generics

2012-05-28 Thread Jorge Aldo G. de F. Junior
Can you create a generic that is based on a class that can stream itself using rtti regardles of its structure ? Something like Type TFundamentalClass = Class(TObject) Public Function GetProperty(Propertyname : String): Variant; Procedure SetProperty(PropertyName : String; Value : Variant);