osvaldo Posted September 29, 2015 Report Share Posted September 29, 2015 Goodmorning everyone! We program in LabVIEW for a long time (fifteen years), but only recently have I been able to devote to learning OOP techniques with LabVIEW.I state that I have little experience in general with the OOP having in fact only a theoretical knowledge of the concepts and patterns and few experiments made in Pascal ... (eh ... eh ... )I come to you humbly ask for the meaning and use cases of the "Restrict references of descendant class type to member VIs of this class." In the tab on inheritance I could not connect this option with any of OOP concepts known to me.Thanks for your help. Osvaldo Quote Link to comment
Yair Posted October 6, 2015 Report Share Posted October 6, 2015 I don't have experience with either of those options, but presumably the second option is an extension of the first, which I understand is designed to make sure that only the class can create DVRs of itself. This is presumably to ensure proper initialization of the objects in the DVR, since LV doesn't have constructors for that. I'm assuming the thinking for the second option is that if you want to create a by-ref object of type A, you can only do it in class A, even if the actual object is B, which inherits from A. Quote Link to comment
osvaldo Posted October 7, 2015 Author Report Share Posted October 7, 2015 Thanks for the replyHmm ... Yes ... In fact it would seem that way ... would require that only the class can instantiate DVR relative to a subclass B derivative of it. The only pattern that comes to mind is the abstract factory, but notI see a use case that requires the option in question ...On the Internet I found no example where this approach was used.Maybe I'll understand the meaning if I happen a situation that makes clear the need for this setting. At the moment I'm just studying the object model of LabVIEW trying to bring him back to what we already know.Thank youOsvaldo Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.