The idea of overloading methods is wide spread in other languages. Labview already supports this in a way with polymorphic vis.
The code snippet below has 2 classes, parent and child
methods are described in the image below.
The underline idea is that parent can define 1 method (poly.vi) that can handle multiple inputs (polymorphic) but does not have to implement the functionality for all the input types (it just needs to know about them) and the child class can override poly.vi and the interface it want to implement.
Even though the code above is correct, Labview gives an error.
"Dynamic dispatch VIs cannot be members of polymorphic VIs."
I dont see why not, since dynamic distpacthing will still have an entry point for both classes (poly.vi) and choosing which polymorphic vi to use will be define at design time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.