Skip to content

Commit

Permalink
Expose GetDataPtr in IInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
EricGrange committed Jan 25, 2022
1 parent ab202c0 commit cdcc279
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/dwsInfo.pas
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ interface
function GetConstructor(const MethName: String; ExtObject: TObject): IInfo;
function GetData : TData;
function GetExternalObject: TObject;
function GetDataPtr : IDataContext;
function GetMember(const s: String): IInfo;
function GetFieldMemberNames : TStrings;
function GetMethod(const s: String): IInfo;
Expand Down
8 changes: 8 additions & 0 deletions Source/dwsInfoClasses.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ TInfo = class (TInterfacedObject, IUnknown, IInfo)

function GetData : TData; virtual;
function GetExternalObject : TObject; virtual;
function GetDataPtr : IDataContext; virtual;
function GetMember(const s : String) : IInfo; virtual;
function GetFieldMemberNames : TStrings; virtual;
function GetMethod(const s : String) : IInfo; virtual;
Expand Down Expand Up @@ -415,6 +416,13 @@ function TInfo.GetExternalObject: TObject;
raise Exception.CreateFmt(RTE_InvalidOp, ['ExternalObject', FTypeSym.Caption]);
end;

// GetDataPtr
//
function TInfo.GetDataPtr : IDataContext;
begin
Result := FDataPtr;
end;

// GetMember
//
function TInfo.GetMember(const s : String) : IInfo;
Expand Down

0 comments on commit cdcc279

Please sign in to comment.