01-21-2009 02:57 AM
Hi,
I am trying to implement LV2OO style global using the Visitor pattern example provided in this document.
Simulate_LV.vi shows the way I normally use LV2 globals. Simulate_LV2OO.vi is how I have used visitor pattern to implement the same functionality using visitor pattern.
I would like to know whether this is the correct implementation and if there a better way to do this?
Thanks.
01-21-2009 12:20 PM
01-21-2009 12:31 PM
Hi,
LabVIEW 8.5 version attached.
01-22-2009 01:47 PM
Very interesting. I really want to use the LV2OO methods, but I'm still really having trouble understanding how they are easier or better.
To quote Stephen Mercer: "I am tired of writing LV2-style globals. These globals are great – very dataflow efficient, very easy to
understand. But you have to duplicate the VI every time you want to support a different data type. I figured
there had to be a better way. I’ve been thinking about this implementation for a while. It may not be optimal,
but I think it is an excellent starting point."
I understand his sentiments, but the LV2OO implementation looks a lot more complicated to me. Just look at how many vi's had to be written. The LV2 style is sooo much easier.
Would anyone like to comment?
01-22-2009 06:23 PM
vt92 wrote:
I understand his sentiments, but the LV2OO implementation looks a lot more complicated to me. Just look at how many vi's had to be written. The LV2 style is sooo much easier.
It is rather too big compared to a simple Get/Set LV2 Style. That's one of the reasons that prompted me to start this thread ![]()
But if you have a complex multifunctional LV2 global, then I guess it will be wise to use LV2OO approach. I am yet to try out the performance implications of LV2OO method.
Anyway I've decided to use LV2OO so that I can understand LabVOOP concepts better.