LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
tst

Add a new VI - Class Hierarchy From Path

Status: New

LabVIEW should have a VI which accepts a path to a class and returns a 1D array of the names of all the classes it inherits from, similar to how the Call Chain primitive returns an array of the calling VIs. It should do this without loading it into memory (which can be very expensive).

 

This can be useful for determining whether a class inherits from another class without having to load it. See this thread for an example.

 

Additionally, there should probably also be a similar VI which accepts the class instead of a path, just for symmetry.


___________________
Try to take over the world!
6 Comments
Miha_Vitorovic
Member

I definitely think that the "class for input" one is more than welcome.

 

Miha

AristosQueue (NI)
NI Employee (retired)

> Additionally, there should probably also be a similar VI which accepts the class instead of a path, just for symmetry.

 

Um... if the node takes a class as input, then the class is already in memory. That would kind of defeat the purpose. If the class is already in memory, we already have mechanisms for doing this.

tst
Knight of NI Knight of NI
Knight of NI

> If the class is already in memory, we already have mechanisms for doing this.

 

Like I said, this would be for symmetry. I don't know the existing mechanisms well, since I never really did this myself, but my impression was that they weren't as simple as having a single standard VI, and while this would not be useful for keeping the memory consumption down, it does have other uses.


___________________
Try to take over the world!
mikemattball
Member

So what is the mechanism to do this?

SteveChandler
Trusted Enthusiast

Ever notice how almost every idea related to object oriented programming gets about twelve kudos then gets hidden in the noise?

 

Kudos.

=====================
LabVIEW 2012


tst
Knight of NI Knight of NI
Knight of NI

> ...So what is the mechanism to do this?

 

 

There is a VI here which is supposed to do it. I haven't checked if it works in an executable.

 

http://lavag.org/topic/8158-inheritance-hierarchy/page__view__findpost__p__73950


___________________
Try to take over the world!