AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

RTTI Enum von Propertys?

Ein Thema von Mavarik · begonnen am 16. Jan 2015 · letzter Beitrag vom 17. Jan 2015
 
Benutzerbild von Mavarik
Mavarik

Registriert seit: 9. Feb 2006
Ort: Stolberg (Rhld)
4.154 Beiträge
 
Delphi 10.3 Rio
 
#11

AW: RTTI Enum von Propertys?

  Alt 17. Jan 2015, 11:13
Delphi-Quellcode:
procedure justRttiThings();
var
   context: TRttiContext;
   rttiType: TRttiType;
   properties: TArray<TRttiProperty>;
   propertyIterator: TRttiProperty;
begin
   context := TRttiContext.Create();
   properties := context.GetType( TypeInfo(TObjectHelper)).GetProperties();

   for propertyIterator in properties do
      WriteLn(propertyIterator.Name);
end;
Das ist schon gut...

Aber was ist wenn ich so etwas habe?

Delphi-Quellcode:
Type
    TFooBasis = class
       private
          FInt : Integer;
       public
          property ParamInt : Integer read FInt;
    end;

    TFoo = class
       private
         FBool : Boolean;
       public
         Property ParamBool : Boolean read FBool;
    end;

var
    FooBasis : TFooBasis;
begin
   FooBasis := TFoo.Create;

   GetAllPropertys(FooBasis);
end;
Komme ich da auch an die Propertys?

Mavarik
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:58 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz