LabVIEW Interface: Difference between revisions
Appearance
Add new page |
Add description, key features and best practice |
||
Line 1: | Line 1: | ||
[[File:Interface Icon.png|thumb|The interface icon as it appears in the [[Project Explorer]]]] | [[File:Interface Icon.png|thumb|The interface icon as it appears in the [[Project Explorer]]]] | ||
'''LabVIEW Interface''' is a kind of [[class library]] that implements the concept of [[Wikipedia:interface (object-oriented programming)|interface]]s in LabVIEW. An interface defines a contract between the caller and the callee. Any class that inherits from an interface declares that it will provide all methods defined by that interface. In LabVIEW a class may have only one class parent and as many interface parents as it wants to have.<ref name="lvi-decision"/> | |||
<br clear="all"> | <br clear="all"> | ||
==Key features== | |||
* Interfaces use the same file extension as classes (*.lvclass). | |||
* Interfaces have their own unique icon ([[File:Interface Icon.png]]) in the [[Project Explorer]]. | |||
* Interfaces use the same default ("chain") wire appearance as classes. | |||
* Interfaces are created and changed using the same dialogs as classes. | |||
* Interfaces can provide default implementations for their methods. | |||
* Classes do not inherit the interface library icon or wire appearance. | |||
* [[Call Parent Class Method function|Call Parent Class Method]] cannot invoke interface parent methods. | |||
==Best practice== | |||
* Do not use the leading "I" when naming interfaces.<ref name="lvi-decision"/> | |||
==History== | ==History== | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 12: | Line 22: | ||
==See also== | ==See also== | ||
* [[Object-oriented programming]] | * [[Object-oriented programming]] | ||
== | ==References== | ||
<references> | |||
<ref name="lvi-decision">[https://forums.ni.com/t5/Community-Documents/LabVIEW-Interfaces-The-Decisions-Behind-the-Design/ta-p/4040237 LabVIEW Interfaces: The Decisions Behind the Design] by AristosQueue</ref> | |||
</references> | |||
{{stub}} | {{stub}} | ||
[[Category:Object-Oriented Programming]] | [[Category:Object-Oriented Programming]] | ||
[[Category:LabVIEW Interface]] | [[Category:LabVIEW Interface]] |
Revision as of 07:41, 30 April 2020

LabVIEW Interface is a kind of class library that implements the concept of interfaces in LabVIEW. An interface defines a contract between the caller and the callee. Any class that inherits from an interface declares that it will provide all methods defined by that interface. In LabVIEW a class may have only one class parent and as many interface parents as it wants to have.[1]
Key features
- Interfaces use the same file extension as classes (*.lvclass).
- Interfaces have their own unique icon (
) in the Project Explorer.
- Interfaces use the same default ("chain") wire appearance as classes.
- Interfaces are created and changed using the same dialogs as classes.
- Interfaces can provide default implementations for their methods.
- Classes do not inherit the interface library icon or wire appearance.
- Call Parent Class Method cannot invoke interface parent methods.
Best practice
- Do not use the leading "I" when naming interfaces.[1]
History
Version | Change(s) |
---|---|
![]() |
Interfaces were added to LabVIEW |
See also
References
- ↑ 1.0 1.1 LabVIEW Interfaces: The Decisions Behind the Design by AristosQueue
![]() |
This article is a stub. You can help LabVIEW Wiki by expanding it. Please improve this article if you can. |