Author: William Gerbert
A RTTI question - it is possible to determine if a certain property is Read-Only,
Write-Only or stored?
Answer:
The following code checks whether a property can be written to, read or whether it
is stored.
1 function IsWriteProp(Info: PPropInfo): Boolean;
2 begin3 Result := Assigned(Info) and (Info^.SetProc <> nil)
4 end;
5 6 function IsReadProp: Boolean;
7 begin8 Result := Assigned(Info) and (Info^.GetProc <> nil)
9 end;
10 11 function IsStoredProp: Boolean;
12 begin13 Result := Assigned(Info) and TYPINFO.IsStoredProp(FObj, Info)
14 end;