An aproximation of what you want to accomplish is the usage of classes 
(descendants of
TPersistent) with published properties accesed using RTTI. The "visible" fields 
you want to access
are these published properties, all other information and methods can't be 
accessed using RTTI.

TCustomer = class(TPersistent)
private
  FAge: Integer;
  FName: string;
published
  property Age: Integer read FAge write FAge;
  property Name: string read FName write FName;
end;


--- Marc Santhoff <[EMAIL PROTECTED]> wrote:

> Am Dienstag, den 25.09.2007, 11:56 +0200 schrieb Jonas Maebe:
> > On 25 Sep 2007, at 11:49, Marc Santhoff wrote:
> > 
> > > would it be possible to set up a memory structure according to fpc's
> > > aligning rules that will be accepted as a record typed variable? Or  
> > > does
> > > fpc create some informational support items that would miss in this
> > > case?
> > >
> > > I'm in doubt, since it is normally not possible (AFAIK, tell me if  
> > > this
> > > is wrong) to get structural information about a record type at runtime
> > > (no RTTI).
> > 
> > Initialisation rtti is generated in case the record contains  
> > reference counted types. It will be easier to answer your question if  
> > you explain what you want to achieve and why.
> 
> I was a little fast in asking this question. It's about passing around
> arbitrary anonymous record consisting of atomic types and strings.
> 
> But since in the end it all comes down to asking for a records members
> and field count I have to use additional typing info and doing the
> memory housekeeping by hand anyways. (If this hasn't changed since fpc
> 2.0.4)
> 
> So forgat about it.
> 
> Marc
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to