unit Member;

//==============================================================================
//  INTERFACE
//==============================================================================
interface

//==============================================================================
type Tmember = class(TObject)
private
   abuseexecv:boolean;
public
   isstatic:boolean;
   isstaticarray:boolean;
   access:integer;
   ignore:boolean;
   ismethod:boolean;
   construct:boolean;
   destruct:boolean;
   decl:integer;
   abuse:boolean;
   fromparent:boolean;
   stub:boolean;

   oninit_value:string;
   oninit_struct:string;
   name:string;
   returntype:string;
   argnumber:integer;
   argtypes:array of string;
   argnames:array of string;

   arraydummy:integer;
   interdefault: string;

   //1:attribute, 2:private attribute, 3:method, 4:private method, 5:constructor, 6:private constructor, 7:destructor, 8:private destructor.
   //11: static attribute
   //12: static private attribute-
   constructor create(d:integer; const s:string; accs:integer; sta:boolean; method:boolean);
   procedure addarg(const t:string; const n:string);
   procedure abuseexecset(const b:boolean);

   property abuseexec:boolean read abuseexecv write abuseexecset;
end;

//==============================================================================
//  IMPLEMENTATION
//==============================================================================
implementation

//==============================================================================
constructor Tmember.create(d:integer;const s:string;accs:integer; sta:boolean; method:boolean);
begin
    oninit_value:='';
    oninit_struct:='';
    decl:=d;
    abuse:=false;
    abuseexecv:=false;
    fromparent:=false;
    stub:=false;
    name:=s;
    access:=accs;
    ignore:=false;
    isstatic:=sta;
    isstaticarray:=False;
    ismethod:=method;
    construct:=false;
    destruct:=false;
    returntype:='nothing';
    argnumber:=0;

    arraydummy:=0;
    interdefault:='';
end;

//==============================================================================
procedure Tmember.addarg(const t:string; const n:string);
begin
    if(Length(argtypes)<=argnumber) then begin
         SetLength(argtypes,argnumber+5);
         SetLength(argnames,argnumber+5);
    end;
    argtypes[argnumber]:=t;
    argnames[argnumber]:=n;
    argnumber:=argnumber+1;
end;

//==============================================================================
procedure Tmember.abuseexecset(const b:boolean);
begin
     if(b) then abuse:=true;
     abuseexecv:=b;
end;

end.
