Jump to content

Event in private data with typedef'ed datatype


Recommended Posts

It's been discussed that having a typedef in the private data of a class is not recommended because of class mutation history...

Would I get the same problem if one of my class member is an event with a typedef'ed enum as its datatype?

The typedef'ed enum is not part of the class [edit] private data[/edit]. The event is not a typedef.

What will happen to class mutation history if I add an item to my enum in a future version of the class?

Link to comment

No, you would not have the same problem. The refnum is the prime type.

In fact, the only problem that arises with typedefs is specifically typedefs of clusters at the top level. If you have an array of typedef of clusters, you're fine. If you have a typedef of array of clusters, fine. If you have a refnum of typedef of clusters, fine. If you have a typedef of refnum of typedef of clusters, fine. If you have a typedef of an enum or anything else, fine.

Only poor top-level typedefs of clusters cause problems.

Link to comment

Maite: You don't get to jump to this conclusion without looking up the backstory. :-) The key phrase in Normandin's post is "because of class mutation history". LabVIEW has help files that talk about the mutation history and there are multiple posts on LAVA about it. Check it out and see if it affects you. It's not that you can't use typedefs of clusters in your private data. It's just that if you do, one useful functionality becomes less useful.

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.