cancel
Showing results for 
Search instead for 
Did you mean: 

Question about parentclass object to subclass object conversion in LVOOP

Highlighted

Question about parentclass object to subclass object conversion in LVOOP

Message contains an image Message contains an attachment

I saw an example project, changing an enumeration item in the passed parent object data, the object becomes the corresponding subclass of the enumeration item, how is this implemented (or labview object-oriented has this mechanism)?

The example documents can be found in the annex.

 

 

 

nzywlll80gmailcom_0-1689496058530.png

 

 

 

 
4 REPLIES 4
ZYOng
Trusted Enthusiast

Re: Question about parentclass object to subclass object conversion in LVOOP

Message contains an image

In Demo #2, there are no child classes for different brews. Instead, there are different child classes for size.

ZYOng_0-1689531610810.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong

Re: Question about parentclass object to subclass object conversion in LVOOP

In the block diagram i have been  post, after the Set Brew method call, the Drink class change to the corresponding Brew class,corresponding.How is this implemented?

Re: Question about parentclass object to subclass object conversion in LVOOP

In the block diagram i have been  post, after the Set Brew method call, the Drink class change to the corresponding Brew class,corresponding.How is this implemented?

ZYOng
Trusted Enthusiast

Re: Question about parentclass object to subclass object conversion in LVOOP

Message contains an image

See the images below. The object is the Drink class until a new instance of Size/Brew class is used to replace the array at the Select Size event.

ZYOng_0-1689549190821.png

ZYOng_1-1689549205793.png

ZYOng_2-1689549215525.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong