Depth of Inheritance Tree (DIT)
Title short form | DIT |
Categories | Maintainability |
Definition | Number of inheritances until a function block is reached that does not extend any other function block |
Further information | DIT = Depth of Inheritance Tree
|
Sample:
FUNCTION_BLOCK FB_BaseFUNCTION_BLOCK FB_Sub EXTENDS FB_BaseFUNCTION_BLOCK FB_SubSub EXTENDS FB_SubThe metric Depth of Inheritance Tree is:
- For
FB_Base: 0, as it is itself a function block that does not extend any other function block. - For
FB_Sub: 1, as one step is required to get toFB_Base. - For
FB_SubSub: 2, as one step toFB_Suband another toFB_Baseis required.