rtti
Delphi: how to set the length of a RTTI-accessed dynamic array using DynArraySetLength?
I\'d like to set the length of a dynamic array, as suggested in this post. I have two classes TMyClass and the related TChildClass defined as[详细]
2022-12-24 03:11 分类:问答Delphi 2010: whatever happened to TRTTIConstructor?
I\'ve got two questions (of which at least one is regarding RTTI in D2010 and dynamic instancing) I was reading what appears to be the foils for a conference talk by Barry Kelly, and found on p. 13[详细]
2022-12-23 17:03 分类:问答Emulating Dynamic Dispatch in C++ based on Template Parameters
This is heavily simplified for the sake of the question. Say I have a hierarchy: struct Base { virtual int precision() const = 0;[详细]
2022-12-22 15:41 分类:问答How to use TValue.AsType<TNotifyEvent> properly?
I\'m trying to use RTTI to add an event handler to a control, that may already have an event handler set. The code looks something like this:[详细]
2022-12-22 07:52 分类:问答Testing for Type Equality without RTTI
Say B and C are derived from A. I want to be able to test whether any two instances of classes derived from A are instances of the same class, that is, whether A* foo and A* bar both point to B instan[详细]
2022-12-20 07:35 分类:问答How to get the object type from a collection (vector) of parent objects using RTTI
I have a base class which has two child classes derived from it. class A {}; class B : public A {}; class C : public A {};[详细]
2022-12-20 03:20 分类:问答Why does dynamic cast from class to subclass requires the class to be polymorphic?
As I understand it, what makes dynamic cast different from a static cast is its use of RTTI, and the fact that it fails if the dynamic type of a variable- when casting from base to derived- does not f[详细]
2022-12-19 10:31 分类:问答Delphi: Prevent method names from appearing in executables
I am writing a class to handle security in my executable (checking serials, trial date check etc). After I compile the executable (even in Release build, with all debug and RTTI generation turned off)[详细]
2022-12-19 03:29 分类:问答How to set NULL to Variant field using rtti
I have a problem setting null to a variant fie开发者_运维百科ld using rtti. Suppose I have class like this:[详细]
2022-12-19 01:10 分类:问答Delphi 2010 RTTI : Explore Enumerations
Considering such an enumeration : type TTypeOfData = ( [XmlName(\'ABC\')] todABC, [XmlName(\'DEF\')] todDEF,[详细]
2022-12-18 12:48 分类:问答