PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Class
  • Object
  • Constructor and destructor
  • Inheritance
  • Data encapsulation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Class
A class contains the description of a data structure (members) and the processes (methods) that handle this structure.
Therefore, a class defines a type of data and its behavior.
See The classes for more details.
Versions 17 and later
AndroidUniversal Windows 10 App The OOP is now available for the Android and Windows Phone applications.
iPhone/iPad The OOP is now available for the iPhone/iPad applications.
New in version 17
AndroidUniversal Windows 10 App The OOP is now available for the Android and Windows Phone applications.
iPhone/iPad The OOP is now available for the iPhone/iPad applications.
AndroidUniversal Windows 10 App The OOP is now available for the Android and Windows Phone applications.
iPhone/iPad The OOP is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App The OOP is available in Universal Windows 10 App mode.
Apple Watch The OOP is available in Apple Watch mode.
New in version 21
Universal Windows 10 App The OOP is available in Universal Windows 10 App mode.
Apple Watch The OOP is available in Apple Watch mode.
Universal Windows 10 App The OOP is available in Universal Windows 10 App mode.
Apple Watch The OOP is available in Apple Watch mode.
Object
A class is used to create objects. Each created object owns the members described in its class and it can be handled via the methods of its class. An object is defined as "an instance of the class".
A class can be considered as being a model that defines the members and the methods common to several objects.
A member is a parameter of the object. A method is used to act on the object, to modify its members for example.
See The objects for more details.
Constructor and destructor
The notion of Constructor and Destructor is important because it involves an automatic call to a method when creating or destroying an object.
  • The Constructor method associated with a class is automatically called when declaring an object of the class. This is used to make sure that the initialization processes of the object (assignment of members for example) will not be forgotten by the developer.
  • The Destructor method associated with a class is automatically called when deleting the object (exit from the procedure where the object was declared). This allows you to free the resources used by the object without fear of oversight (memory zone for example). It can also be used to update a file related to the object.
See Constructor and Destructor for more details.
Inheritance
The inheritance is used to include the characteristics of an existing class (base class) into a new class (derived class). This allows you to create a new type of data from a known type, in order to add features or to modify its behavior. Therefore, the base class will not be modified. A class can inherit from one or more classes; it becomes a sub-class of this class.
A derived class inherits the members and methods of its parent classes, in addition to its own members and methods. There is no need to duplicate the members and method of the parent classes.
See Class inheritance for more details.
Data encapsulation
The data encapsulation is probably the most important notion in OOP. This technique ensures that the object data will not be wrongly modified by functions (methods) external to the object. This allows you to prevent the user of an object from accessing some or all of its members. The members whose access is forbidden are called private members.
They can only be accessed from some specific methods of the class.
Related Examples:
WD Simple OOP Training (WINDEV): WD Simple OOP
[ + ] The "WD Simple OOP" example is an educational example about the OOP with WINDEV. This example presents the operating mode of:
- classes,
- inheritances,
- virtual procedures,
- UML diagrams,
- ...
WD Controlling word processor Training (WINDEV): WD Controlling word processor
[ + ] The purpose of this example is to propose a universal interface, allowing to control these applications without having to worry about the application to control. This example is based on an object-oriented programming concept: the polymorphism. It consists in using different objects (OpenOffice object and Microsoft Word object) without really knowing which one is used.
WD Graphic Objects Training (WINDEV): WD Graphic Objects
[ + ] This educational example illustrates the power of WLanguage regarding object-oriented programming.
This example is an editor of graphic objects.

You have the ability to:
- move, resize the objects
- perform selections with the lasso or with the mouse
- cut/copy/paste objects
- delete/duplicate objects
- save the created documents and print them.

The main technical features presented and documented in this example are as follows:
- managing a clipboard of objects
- managing UNDO/REDO
- serializing and deserializing objects
- OOP
- algorithms for managing graphic objects (proportional resize operations, management of movement rules, etc.)
WD Controlling Outlook Training (WINDEV): WD Controlling Outlook
[ + ] This program, powered by WINDEV, is used to read and write in the Outlook folders:
- Email
- Calendar
- Contacts
- Tasks
- Notes

An OLE dialog is used to read and write data in the Outlook files.
Note: We will be using the Outlook software supplied with the later versions of MS-Office. The software used is not "Outlook express".

"WD Controlling Outlook" also presents an example for using the WINDEV databinding between the variables found in the code and in the controls.

This example also presents the OOP (Object-Oriented Programming) and the UML diagrams.
WD Flowchart Training (WINDEV): WD Flowchart
[ + ] This example is used to create organization charts.
An organization chart is used to indicate the repartition of the managers within a company and the relationships that exist between these managers.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment