11-01-2011 01:24 PM
I'll speculate for you Shane.
It is a run-time thing.
LVOOP class wires just carry a pointer that points to a data structure that in turn defines what is in the class and where to find in in core.
When we invoke a method LV uses the pointer to find the best fit for that type of wire based on the inheritance and availablity of the method used to figure which version of the method (from which class) gets called with the pointer found in the LVOOP wire. That VI works based off that wire and is done.
By using pointers and data structures LV can select the proper version of the method to use even at run-time in a built application.
We can alost liken it to how dll work under windows where the file association is looked up in the registry to figure who to call for this type of file but in LVOOP the registry is defined by the class hiarchy.
A virus can atack a PC by modifying the registry to point at itself instead of the proper dll so it can hook-in.
Done specualting and sharing my model of LVOOP.
Aristos COULD straighten me out if he wanted to but NI so closely guards how they implement stuff like this that I would be suprised if he did.
And if you (Stephen) are reading this wildly speuculative post, feel free to "put me in my place".
Ben
PS: Wire branching duplicate the wire and the buffer that goes with it.
PPS: Does the restriction LVOOP methods put on re-entrancy fit with the above? You tell me.
11-01-2011 01:44 PM
@Ben wrote:
Aristos COULD straighten me out if he wanted to but NI so closely guards how they implement stuff like this that I would be suprised if he did.
I wouldn't characterize this as "closely guards" - http://zone.ni.com/devzone/cda/tut/p/id/3574
11-01-2011 01:57 PM
@tst wrote:
@Ben wrote:
Aristos COULD straighten me out if he wanted to but NI so closely guards how they implement stuff like this that I would be suprised if he did.
I wouldn't characterize this as "closely guards" - http://zone.ni.com/devzone/cda/tut/p/id/3574
I think I had seen that before but I do recall the part about the mapping to memory part. Maybe I was remebering when I thought I was specualting.
Ben
11-01-2011 06:13 PM
I'll clarify a bit.
what I was referring to as "inheriting" meant imagining that a class could somehow (during run-time) decide to inherit from a different base class than is currently the case and thus inheriting completely new properties and abilities. This is certainly NOT possible in LV and (AFAIK) in no other language.
I understand (more or less) how the handling of "Which ancestor within your class tree will you be today" for a given wire in LVOOP works, but this isn't what I was talking about since this doesn't actually CHANGE the inheritance, it only changes the handling of it.
Shane.
11-01-2011 06:16 PM
I had actually found a bug in LVOOP which allowed a dynamic dispatch class actually CHANGE it's ACTUAL class type during run-time which is of course a no-no. It resulted in (obviously enough) some interesting side-effects of the run-time enging traing to call non-existing methods and such. Didn't work too well event hough I coudl have exploited it for a project I was working on.....
Since AQ told me that this had apparently been found and fixed previously confirmed to me that this is NOT intended behaviour. OF course the "Apparent" object type can change depending on what's going on int he code, but the "actual" object type remains the same.
11-02-2011 08:10 AM
Under common lisp you can build a class during run-time