* Define RTTI visibilities

This commit is contained in:
Michaël Van Canneyt 2023-05-30 15:55:08 +02:00 committed by Sven/Sarah Barth
parent b4ff9b71d3
commit 50d72bb559

View File

@ -11,6 +11,13 @@
**********************************************************************}
{$IF DEFINED(CPU8) OR DEFINED(CPU16)}
{ disable the extended RTTI for the RTL/FCL on these targets; the user can of
course still enable it for their own classes if needed (and published
properties and methods are accessible using the legacy RTTI as well) }
{$DEFINE SMALLRTTI}
{$ENDIF}
{$PUSH}
{$MINENUMSIZE 1 this saves a lot of memory }
@ -26,6 +33,23 @@ type
tkDynArray,tkInterfaceRaw,tkProcVar,tkUString,tkUChar,
tkHelper,tkFile,tkClassRef,tkPointer);
TVisibilityClass = (vcPrivate, vcProtected, vcPublic, vcPublished);
TVisibilityClasses = set of TVisibilityClass;
{$MINENUMSIZE DEFAULT}
const
{$IFNDEF SMALLRTTI}
DefaultFieldRttiVisibility = [vcPrivate..vcPublished];
DefaultMethodRttiVisibility = [vcPublic..vcPublished];
DefaultPropertyRttiVisibility = [vcPublic..vcPublished];
{$ELSE SMALLRTTI}
DefaultFieldRttiVisibility = [];
DefaultMethodRttiVisibility = [];
DefaultPropertyRttiVisibility = [];
{$ENDIF SMALLRTTI}
{$POP}
const