unit Aurelius.Types.MasterObjectValue;

{$I Aurelius.inc}

interface

type
  TMasterObjectAction = (None, Include, Exclude);

  IMasterObjectNotifier = interface
  ['{14B87955-C2AD-4DD5-8332-4B85FDACFF46}']
    procedure ChildAdded(Entity: TObject);
    procedure ChildRemoved(Entity: TObject);
  end;

  TMasterObjectValue = record
  private
    FMasterObject: TObject;
    FMasterAssocMember: string;
    FMasterObjectAction: TMasterObjectAction;
    FNotifier: IMasterObjectNotifier;
  public
    property MasterObject: TObject read FMasterObject write FMasterObject;
    property MasterAssocMember: string read FMasterAssocMember write FMasterAssocMember;
    property Action: TMasterObjectAction read FMasterObjectAction write FMasterObjectAction;
    property Notifier: IMasterObjectNotifier read FNotifier write FNotifier;
  end;

function DummyMasterObject: TMasterObjectValue;

implementation

function DummyMasterObject: TMasterObjectValue;
begin
  Result.MasterObject := nil;
  Result.MasterAssocMember := '';
  Result.Action := TMasterObjectAction.None;
  Result.Notifier := nil;
end;

end.
