System.Rtti.TRttiIndexedProperty.GetValue
Delphi
function GetValue(Instance: Pointer; const Args: array of TValue): TValue;
C++
TValue __fastcall GetValue(void * Instance, const TValue *Args, const int Args_High);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Rtti.pas System.Rtti.hpp |
System.Rtti | TRttiIndexedProperty |
Description
Returns the value of a specific element from the collection represented by this TRttiIndexedProperty instance.
GetValue returns a TValue representing the property value for a specific index.
Parameters are described in the following table:
Name | Description |
---|---|
Instance | The target instance of the class that has indexed properties. |
Args | Index information. |
Example (Delphi):
TCar = class
public
function GetDoor(Index1: Integer; Index2: Integer): Pointer;
property Door[Index1: Integer; Index2: Integer]: Pointer read GetDoor;
end;
// ...
APointer := TRttiIndexedPropertyInstance.GetValue(TCarInstance, [SomeValueForIndex1, SomeValueForIndex2]);