PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Access rights to a class property: special cases
The retrieval and assignment processes can be public, private or protected. The access rights of the property correspond to the less restrictive rights of the two processes.
AndroidUniversal Windows 10 AppJava The class properties are not available.
Universal Windows 10 App The class properties are not available.
Versions 22 and later
AndroidJava The class properties are now available.
New in version 22
AndroidJava The class properties are now available.
AndroidJava The class properties are now available.
Access rights of the property according to the access rights of the processes:
Assignment process
/
Retrieval process
Public
Protected
Private
PublicPublicPublicPublic
ProtectedPublicProtectedProtected
PrivatePublicProtectedPrivate
The properties are accessible on the instances and by inheritance by respecting the standard restrictions of the public, protected and private inheritances.
If the access rights allow the read operations but not the write operations, the property is considered as being read-only.
If the access rights allow the write operations but not the read operations, the property is considered as being write-only.
These cases trigger an error during the compilation but no error is triggered at run time.
The tables below present the possible cases:
  • Using the class:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicRead/WriteWrite-onlyWrite-only
    ProtectedRead-onlyProtectedProtected
    PrivateRead-onlyProtectedPrivate

    Using a derived class:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicRead/WriteRead/WriteWrite-only
    ProtectedRead/WriteRead/WriteWrite-only
    PrivateRead-onlyRead-onlyPrivate
  • Using a class with public inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicRead/WriteWrite-onlyWrite-only
    ProtectedRead-onlyProtectedProtected
    PrivateRead-onlyProtectedPrivate
  • Using a class derived from a class with public inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicRead/WriteRead/WriteWrite-only
    ProtectedRead/WriteRead/WriteWrite-only
    PrivateRead-onlyRead-onlyPrivate
  • Using a class with protected inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicProtected inheritanceProtected inheritanceProtected inheritance
    ProtectedProtected inheritanceProtected inheritanceProtected inheritance
    PrivateProtected inheritanceProtected inheritanceProtected inheritance
  • Using a class derived from a class with protected inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicRead/WriteRead/WriteWrite-only
    ProtectedRead/WriteRead/WriteWrite-only
    PrivateRead-onlyRead-onlyPrivate
  • Using a class with private inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicPrivate inheritancePrivate inheritancePrivate inheritance
    ProtectedPrivate inheritancePrivate inheritancePrivate inheritance
    PrivatePrivate inheritancePrivate inheritancePrivate inheritance
  • Using a derived class with private inheritance:
    Assignment process
    /
    Retrieval process
    Public
    Protected
    Private
    PublicPrivate inheritancePrivate inheritancePrivate inheritance
    ProtectedPrivate inheritancePrivate inheritancePrivate inheritance
    PrivatePrivate inheritancePrivate inheritancePrivate inheritance
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment