delphi prototype pattern

前端 未结 5 558
梦毁少年i
梦毁少年i 2021-01-03 05:30

I was wondering, is there anything in the RTTI of Delphi that will do the same as MemberwiseClone does in C# for the simple implementation of the prototype pattern. I saw so

5条回答
  •  既然无缘
    2021-01-03 05:53

    I think you are looking for something similar to this: http://code.google.com/p/delphilhlplib/source/browse/trunk/Library/src/Extensions/DeHL.Cloning.pas

    It will only work on D2010 and up (requires extended RTTI).

提交回复
热议问题