Jump to content

Restrict references of descendant class type to member VIs of this class inheritance option


Recommended Posts

Goodmorning everyone! :yes:

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 ... :P )
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. :worshippy:

Osvaldo

Link to comment

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.

Link to comment

Thanks for the reply
Hmm ... 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 not
I 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 you
Osvaldo

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.