I'm modifying an old Delphi app that used to be written inTurbo Pascal, and I have a question with the old "Object" keyword. One day we'll change it, but for now I have to make a small change. When a method is declared "Virtual", do I not need the "Override" keyword to override it? What about the constructor. Will I automatically inherit the constructor? Here is the declaration: (TV_Pro2014 is the child class)
I'm modifying an old Delphi app that used to be written inTurbo Pascal, and I have a question with the old "Object" keyword. One day we'll change it, but for now I have to make a small change. When a method is declared "Virtual", do I not need the "Override" keyword to override it? What about the constructor. Will I automatically inherit the constructor? Here is the declaration: (TV_Pro2014 is the child class)
PV_Pro = ^TV_Pro;
TV_Pro = OBJECT(TVIRTUS_VALUE2)
constructor INIT(CONST INIT_INSURED : PINSURED;
CONST INIT_PLAN_CODE : LONGINT);
FUNCTION GET_FACE_AMT_BAND(CONST Base_Face_Amt : Longint): TBAND; VIRTUAL;
//Function READ_GUAR_COI_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
FUNCTION GET_CURR_COI_RATE_FILENAME(CONST SEX : CHAR) : STRING; VIRTUAL;
Function READ_CURR_COI_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
FUNCTION GET_NOLAPSE_PREMIUM_BAND(CONST CURR_DATE : TDATE): TBAND; VIRTUAL;
Function READ_MISC_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
Function READ_PER_UNIT_CHARGES : Boolean; VIRTUAL;
FUNCTION GET_PER_UNIT_CHARGE(SEG_NUM : INTEGER) : FLOAT; VIRTUAL;
FUNCTION GET_PREMIUM_CHARGE_PERCENT(CURR_YR : BYTE; MORTTYP : CHAR) : FLOAT; VIRTUAL;
FUNCTION GET_PREMIUM_CHARGE: FLOAT; virtual;
FUNCTION GET_BASIC_COV_AMT_CHARGE : FLOAT; VIRTUAL;
FUNCTION GET_CURR_PER_UNIT_YRS : INTEGER; VIRTUAL;
PROCEDURE CALC_GUIDELINE_PREMIUM(CONST AGETYPE : TAGE_TYPE;
CONST CURR_DATE : TDATE); VIRTUAL;
FUNCTION GET_GUAR_INT_RATE : FLOAT; VIRTUAL;
FUNCTION GET_PCT_RTG_ADJUST_FACTOR_FOR_MINPREM_CALC : FLOAT; VIRTUAL;
function GET_PCT_RTG_ADJUST_FACTOR_FOR_MCP_CALC: FLOAT; VIRTUAL;
FUNCTION GET_LOAN_ACCUM_INT_RATE : FLOAT; VIRTUAL;
end;
PV_ProWL = ^TV_ProWL;
TV_ProWL = OBJECT(TV_Pro)
constructor INIT(CONST INIT_INSURED : PINSURED;
CONST INIT_PLAN_CODE : LONGINT);
FUNCTION GET_LOAN_TYPE : TLOAN_TYPE; VIRTUAL;
FUNCTION HAS_WASH_LOAN_FEATURE : BOOLEAN; VIRTUAL;
FUNCTION GET_WASH_LOAN_START_YR : BYTE; VIRTUAL;
FUNCTION GET_Wash_LOAN_ACCUM_INT_RATE : FLOAT; VIRTUAL;
end;
PV_Pro2014 = ^TV_Pro2014;
TV_Pro2014 = OBJECT(TV_Pro)
Function READ_MISC_RATES(CONST SEX : CHAR): Boolean; override;
end;
PV_Pro = ^TV_Pro;
TV_Pro = OBJECT(TVIRTUS_VALUE2)
constructor INIT(CONST INIT_INSURED : PINSURED;
CONST INIT_PLAN_CODE : LONGINT);
FUNCTION GET_FACE_AMT_BAND(CONST Base_Face_Amt : Longint): TBAND; VIRTUAL;
//Function READ_GUAR_COI_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
FUNCTION GET_CURR_COI_RATE_FILENAME(CONST SEX : CHAR) : STRING; VIRTUAL;
Function READ_CURR_COI_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
FUNCTION GET_NOLAPSE_PREMIUM_BAND(CONST CURR_DATE : TDATE): TBAND; VIRTUAL;
Function READ_MISC_RATES(CONST SEX : CHAR): Boolean; VIRTUAL;
Function READ_PER_UNIT_CHARGES : Boolean; VIRTUAL;
FUNCTION GET_PER_UNIT_CHARGE(SEG_NUM : INTEGER) : FLOAT; VIRTUAL;
FUNCTION GET_PREMIUM_CHARGE_PERCENT(CURR_YR : BYTE; MORTTYP : CHAR) : FLOAT; VIRTUAL;
FUNCTION GET_PREMIUM_CHARGE: FLOAT; virtual;
FUNCTION GET_BASIC_COV_AMT_CHARGE : FLOAT; VIRTUAL;
FUNCTION GET_CURR_PER_UNIT_YRS : INTEGER; VIRTUAL;
PROCEDURE CALC_GUIDELINE_PREMIUM(CONST AGETYPE : TAGE_TYPE;
CONST CURR_DATE : TDATE); VIRTUAL;
FUNCTION GET_GUAR_INT_RATE : FLOAT; VIRTUAL;
FUNCTION GET_PCT_RTG_ADJUST_FACTOR_FOR_MINPREM_CALC : FLOAT; VIRTUAL;
function GET_PCT_RTG_ADJUST_FACTOR_FOR_MCP_CALC: FLOAT; VIRTUAL;
FUNCTION GET_LOAN_ACCUM_INT_RATE : FLOAT; VIRTUAL;
end;
PV_ProWL = ^TV_ProWL;
TV_ProWL = OBJECT(TV_Pro)
constructor INIT(CONST INIT_INSURED : PINSURED;
CONST INIT_PLAN_CODE : LONGINT);
FUNCTION GET_LOAN_TYPE : TLOAN_TYPE; VIRTUAL;
FUNCTION HAS_WASH_LOAN_FEATURE : BOOLEAN; VIRTUAL;
FUNCTION GET_WASH_LOAN_START_YR : BYTE; VIRTUAL;
FUNCTION GET_Wash_LOAN_ACCUM_INT_RATE : FLOAT; VIRTUAL;
end;
PV_Pro2014 = ^TV_Pro2014;
TV_Pro2014 = OBJECT(TV_Pro)
Function READ_MISC_RATES(CONST SEX : CHAR): Boolean; override;
end;
Comments
Post a Comment