LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

way to test an empty class

Hello,

 

i wonder to know wich way can i use to test if an object contained by another exist or not

 

 

Best regards

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 1 of 4
(2,623 Views)

Hi,

 

What do you mean by exist or not?

What do you want to do?

Could you give us more details about your question?

 

Regards, Samuel G.

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 2 of 4
(2,609 Views)

Hello,

 

I mean for example if  i have a car class including  or not (optional) a radio set 

 

I thought that creating the car object not involve creating the radio but i tested  it is false

a default radio is present.  So an object for what i tested is never null .

 

How to manage optionals objects into others ?  example of car with options : radio set, gps, air bag, tv ...

 

may be the create by ref is needed in this case ?  or maybe creating child class of options with the default class , no radio, no gps, no air bag ...  ?

 

Best regards

 

Tinnitus

 

 

 

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 3 of 4
(2,603 Views)

 

You can create a Boolean in your option (radio set, gps, air bag, tv). When the car is created, the Boolean are instantiate. Then you could create a method to check is the Boolean ok or not.

Regards Samuel G.

Samuel G. | GEMESIS

Certified LabVIEW Architect

Certified TestStand Developer

GEMESIS.EU

0 Kudos
Message 4 of 4
(2,600 Views)