Browse Source

Added stored specifier for some props

michael 26 years ago
parent
commit
07936d54b8
1 changed files with 20 additions and 0 deletions
  1. 20 0
      tests/testrtti.pp

+ 20 - 0
tests/testrtti.pp

@@ -32,6 +32,7 @@ Type
        FExtended : Extended;
        FMyEnum   : TMyEnum;
        FAnsiString   : AnsiSTring;
+       FStored   : Boolean; 
        Function GetBoolean : Boolean;
        Function GetByte : Byte;
        Function GetChar : Char;
@@ -76,6 +77,8 @@ Type
        Procedure SetVirtualExtended ( Value : Extended ); virtual;
        Procedure SetVirtualAnsiString ( Value : AnsiString ); virtual;
        Procedure SetVirtualMyEnum ( Value : TMyEnum ); virtual;
+       Function GetStaticStored : Boolean;
+       Function GetVirtualStored : Boolean;
        Public
        Constructor Create;
        Destructor Destroy;override;       
@@ -113,6 +116,11 @@ Type
        Property ExtendedVirtualMethod : Extended Read GetVirtualExtended Write SetVirtualExtended;       
        Property AnsiStringVirtualMethod : AnsiString Read GetVirtualAnsiString Write SetVirtualAnsiString;       
        Property MyEnumVirtualMethod : TMyEnum Read GetVirtualMyEnum Write SetVirtualMyEnum;
+       Property StoredIntegerConstFalse : Longint Read FLongint Stored False;
+       Property StoredIntegerConstTrue : Longint Read FLongint Stored True;
+       Property StoredIntegerField : Longint Read FLongint Stored FStored;
+       Property StoredIntegerMethod : Longint Read Flongint Stored GetStaticStored;
+       Property StoredIntegerVirtualMethod : Longint Read Flongint Stored GetStaticStored;
        end;
 
 Constructor TMyTestObject.Create;
@@ -363,6 +371,18 @@ begin
   FMyEnum:=Value;
 end;
 
+Function TMyTestObject.GetStaticStored : Boolean;
+
+begin
+  Result:=False;
+end;
+
+Function TMyTestObject.GetVirtualStored : Boolean;
+
+begin
+  Result:=False;
+end;
+
 Procedure DumpMem ( PL : PByte );
 
 Var I,j : longint;