LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer all Must Override requirements to descendant classes, use case?

Solved!
Go to solution

Hi All,

 

When to use and what is the use case for the below option available in inheritance.

 

Transfer all Must Override requirements to descendant classes .

 

Thanks

0 Kudos
Message 1 of 3
(2,285 Views)
Solution
Accepted by topic author LV_COder

Class A defines some interface with a collection of "Must Override" VIs.

 

Class B inherits from A, but is still an "abstract class" (LabVIEW doesn't have abstract class, but perhaps you're familiar with the idea. You can search online for more details - the idea is that basically they define some interface but don't implement any/all of it). Typically in LabVIEW this looks like a lot of empty block diagrams or just connected straight across wires (especially class wires, which you might want to connect across in case someone calls the parent implementation).

 

Class C inherits from B and implements the VIs.

 

If B doesn't mark the "transfer" checkbox, then it must produce overrides for all of A's DD VIs, even if it still won't implement them, and that will allow C to not implement them (because B does).

So marking the checkbox means: don't want to be broken even though I don't implement these VIs. Make my children do the work!


GCentral
Message 2 of 3
(2,216 Views)

Got it, Thanks.

0 Kudos
Message 3 of 3
(2,183 Views)