Jump to content

Class (object-oriented programming): Difference between revisions

From LabVIEW Wiki
Add new page
 
m Fix typo
 
Line 1: Line 1:
In [[object-oriented programming]] a class defines data and [[method (object-oriented programming)|method]]s to work with that data. A specific instance of a class is called [[object (object-oriented programming)|object]].
In [[object-oriented programming]] a '''class''' defines data and [[method (object-oriented programming)|method]]s to work with that data. A specific instance of a class is called [[object (object-oriented programming)|object]].


==Classes in LabVIEW==
==Classes in LabVIEW==

Latest revision as of 07:59, 3 April 2020

In object-oriented programming a class defines data and methods to work with that data. A specific instance of a class is called object.

Classes in LabVIEW

Classes in LabVIEW are stored in .lvclass files on disk.

Every class in LabVIEW ultimately inherits from LabVIEW Object, the ultimate ancestor for all LabVIEW classes. Having a common ancestor class provides a way to write functions that can take any class and operate on those classes in a common manner. [...] A common ancestor class provides a type that can be used by nodes such as Build Array to store objects from multiple classes in a single array.[1]

LabVIEW has private data only. You cannot create public or protected data. Only VIs can be public or protected.[1]

References