Skip to main content
Top

2019 | OriginalPaper | Chapter

4. Object-Oriented Programming

Author : Michael Lauer

Published in: Introducing Vala Programming

Publisher: Apress

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

This chapter goes into the details of object-oriented programming, which is the central programming paradigm of Vala, including classes, interfaces, polymorphism, and the signal mechanism for the loose binding of components.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
1
This boils down to the difference of glib’s static and fundamental type concept. Classes derived from GLib.Object are registered with g_type_register_static(), others are registered with g_type_register_fundamental().
 
2
An indicator of an upcoming problem is the triggered compiler warning “warning: Two.doit hides inherited method One.doit. Use the new keyword if hiding was intentional.” Following this advice won’t solve the mentioned problem though.
 
3
If you’re not interested in the actual sender, you can leave out this parameter in the signal handler. You may also omit any number of trailing parameters. You can even connect signal handlers not taking any parameters, independent of the actual signal signature.
 
4
Unfortunately, just emitting a warning here is not quite helpful, since (a) you can’t catch the warning and (b) the assignment still “works.” It would have been better to set the variable to null, if the dynamic type cast fails.
 
Metadata
Title
Object-Oriented Programming
Author
Michael Lauer
Copyright Year
2019
Publisher
Apress
DOI
https://doi.org/10.1007/978-1-4842-5380-9_4

Premium Partner