Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1993

Factory to create instances from known (generated) interface types with Delphi

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.1
    • None
    • Windows

    • Patch Available

    Description

      Feature to optionally create code which registers Thrift-generated Delphi interfaces with their implementing classes. This enables the developer to easily create an entity based on the known interface types and/or create thrift entities within generic classes more easily:

      var thing : IThing;
      begin
        thing := TypeRegistry.Construct<IThing>;
        // do something with thing
      end;
      

      Without this feature, one would have to know the class name and write:

      var thing : IThing;
      begin
        thing := TThingImpl.Create;
        // do something with thing
      end;
      

      Attachments

        Activity

          People

            jensg Jens Geyer
            jensg Jens Geyer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: