Statement PROTECTED: Foundation
Limits visibility of member variables and methods to subclasses
Syntax
PROTECTED:
Description
The keyword PROTECTED: determines the visibility attribute for subsequently declared member variables and methods within the class declaration. The member variables and methods which are declared after PROTECTED: are only visible within the source code of the methods of the declared class and its subclasses and can only be used within these methods.
Examples
// The example illustrates how the visibility attribute
// is defined with a class declaration.
CLASS classA
VAR varA // Visibility is HIDDEN:
EXPORTED:
VAR varB, varC // Globally visible
METHOD methodA, methodB
PROTECTED:
VAR varD, varE // Visible only in methods
METHOD methodC, methodD
ENDCLASS
Feedback
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.