
Virtual function
In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important part of the (runtime) polymorphism portion of object-oriented programming (OOP). In short, a virtual function defines a target function to be executed, but the target might not be known at compile time.
- Comment
- enIn object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important part of the (runtime) polymorphism portion of object-oriented programming (OOP). In short, a virtual function defines a target function to be executed, but the target might not be known at compile time.
- Depiction
- Has abstract
- enIn object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important part of the (runtime) polymorphism portion of object-oriented programming (OOP). In short, a virtual function defines a target function to be executed, but the target might not be known at compile time. Most programming languages, such as JavaScript, PHP and Python, treat all methods as virtual by default and do not provide a modifier to change this behavior. However, some languages provide modifiers to prevent methods from being overridden by derived classes (such as the final keyword in Java and PHP).
- Hypernym
- Function
- Is primary topic of
- Virtual function
- Label
- enVirtual function
- Link from a Wikipage to another Wikipage
- Abstract class
- Abstract Factory Pattern
- Abstract method
- Abstract type
- C++
- Category:Articles with example C++ code
- Category:C++
- Category:Method (computer programming)
- Category:Object-oriented programming
- Compile time
- Component object model
- Constructor (computer science)
- Design pattern
- Design pattern (computer science)
- Destructor (computer science)
- Dynamic dispatch
- File:ClassDiagram for VirtualFunction.png
- Function (computer science)
- Inheritance (computer science)
- Interface (Java)
- Interface (object oriented programming)
- Java (programming language)
- JavaScript
- Link time
- Method (computer science)
- Method implementation
- Method overriding (programming)
- Multiple inheritance
- Object-oriented programming
- Object Pascal
- PHP
- Pointer (computer programming)
- Polymorphism (computer science)
- Python (programming language)
- Reference (computer science)
- Runtime (program lifecycle phase)
- Runtime system
- Static dispatch
- Subclass (computer science)
- Superclass (computer science)
- Type signature
- Undefined behavior
- Virtual class
- Virtual inheritance
- Virtual method table
- SameAs
- Fonction virtuelle
- Função virtual
- Función virtual
- Funcție virtuală
- Funzione virtuale
- Hàm ảo
- m.020wbf
- Metoda wirtualna
- Q1500644
- Virtuaalimetodi
- Virtual function
- Virtuální funkce
- Virtuelle Methode
- Vt7R
- Виртуальный метод
- Віртуальний метод
- 虚函数
- 가상 함수
- Subject
- Category:Articles with example C++ code
- Category:C++
- Category:Method (computer programming)
- Category:Object-oriented programming
- Thumbnail
- WasDerivedFrom
- Virtual function?oldid=1096837211&ns=0
- WikiPageInterLanguageLink
- Funktion (programmering)
- WikiPageLength
- 13865
- Wikipage page ID
- 374664
- Wikipage revision ID
- 1096837211
- WikiPageUsesTemplate
- Template:Citation needed
- Template:Cpp
- Template:Further
- Template:More citations needed
- Template:Polymorphism
- Template:Reflist
- Template:Rp
- Template:Short description