09-07-2013 10:53 AM
Hey guys,
I'm interested, is it possible to have static method in derrivative class with the same name, as in base class?
09-08-2013 01:36 PM
Hi,
Since G# very simply could be explained as a native LV class with a DVR structure placed in the private class data, all inheritance rule comes from how native LabVIEW classes works. This means you can't have a method with the same name in a subclass as in the base class unless it is set as dynamic dispatch (i.e virtual). In G# there can't be any virtual static methods- Therefore static or not static doesn't really matter since LabVIEW doesn't care about the differernce. All it see is its VI name and scope.
/Mattias
09-08-2013 01:42 PM
So as I understand, the non modifying class method, is only a template, right? No native usage.
09-08-2013 01:58 PM
Yes, it is. From a LabVIEW point of view the only difference to a non-static method is the lack of class control and since they are not present it is impossible to make it dynamic dispatch and thereby impossible to define another VI with the same name in the class hierarchy due to how LabVIEW classes works.