rtti Questions

3

Solved

How do I use RTTI to set an enumerated field's value ? I.e. type TCPIFileStatus= (fsUnknown, fsProcessed); TTest = class FStatus: TCPIFileStatus; end; ... var Data: TTest; Ctx: TRttiCont...
Alnico asked 25/3, 2011 at 2:31

3

Solved

Using gcc, when I ask for an object/variable's type using typeid, I get a different result from the type_info::name method from what I'd expect to get on Windows. I Googled around a bit, and found ...
Percolate asked 18/1, 2010 at 10:16

2

Solved

Using the RTTI system in Delphi 2010, is there any way to find out if a property is a TDateTime? It's currently treating it as a double whenever I call back asVariant and also if I check the proper...
Chloride asked 20/10, 2011 at 13:45

1

Solved

It seems that one, in my opinion mandatory method is missing from TValue; TValue.Equals(TValue). So whats a fast and decent way of comparing 2 TValues, preferably without the use of TValue.ToStri...
Thimbleful asked 21/3, 2012 at 8:27

1

Solved

Facts: Successfull independent efforts to bring Rtti.TVirtualInterface introduced in Delphi XE2 to prior Delphi versions were made respectively by Vincent Parrett in Delphi.Mocks.VirtualInterfac...
Nictitate asked 13/3, 2012 at 19:14

1

Solved

I have this class: TMyClass = class public function DoSomethingNice(const Value: string = 'Yes please!'): Boolean; end; Now, using RTTI, is it possible to get default value of parameter Value o...
Fatling asked 26/2, 2012 at 4:20

2

I'm attempting to use the enhanced RTTI features in Delphi XE or later, to read and write objects to XML. So far I've been successful with integers, floats, strings, enumerated types, sets and clas...
Scissile asked 17/1, 2011 at 22:2

1

hi all :) it is my first question at stackoverflow :) in Delphi XE2 RTTI we have TRttiMethod class and it has function CreateImplementation() wich allows to dynamically create procedure or functio...
Eel asked 17/2, 2012 at 15:5

4

Solved

I recently saw an OO design question on some forum and started thinking of using RTTI. However this must be bad design but I am unable to think of an alternative. Here is the simple question : Cr...
Drivein asked 15/2, 2012 at 3:8

2

Solved

I would like to use RTTI to examine the types contained within project source files at designtime rather than runtime. To the best of my knowledge this is unsupported but the discussion in the com...
Crucify asked 29/1, 2012 at 22:21

4

Solved

I've got a class hierarchy as this one: class A { } // class AA : A { } // A class AAA : AA { } // / \ class AAB : AA { } // AA AB class AB : A { } // / \ / \ class ABA : AB { } // AAA AAB ABA ABB...
Cavesson asked 4/12, 2010 at 11:46

1

Solved

We can use the SuperObject library to invoke methods of a certain object by its name and giving its parameters as a json string using the SOInvoker method like in this answer I'd like to know how ...
Madelainemadeleine asked 20/10, 2011 at 20:8

1

Solved

I'm using this code to get the element type of an array {$APPTYPE CONSOLE} uses Rtti, SysUtils; type TFooArray= array of TDateTime; Var T : TRttiType; begin try T:=TRttiContext.Create.Get...
Nonsuit asked 31/12, 2011 at 2:36

4

Solved

According to cplusplus.com, the std::type_info::before() function... Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order kept...
Hemispheroid asked 30/12, 2011 at 18:16

3

Solved

consider this simple code {$APPTYPE CONSOLE} uses Rtti, SysUtils; type {$M+} TFoo = class strict private class var Field1 : Integer; field2 : Integer; private field3 : Integer; class v...
Marshallmarshallese asked 23/9, 2011 at 6:23

1

Solved

I have several classes of a thirdparty component (which I cannot modify), Now I need to access to some classes declarated in the implementation part of that unit, The question : Is possible get rtt...
Bojorquez asked 16/12, 2011 at 18:52

1

Solved

I need to get a list of form types, but only for types derived from a given base form. I use Delphi 2010 and enhanced RTTI to browse types My current code is: rc := TRTTIContext.Create; rtyps :=...
Leprose asked 8/12, 2011 at 16:3

1

Solved

I had problems using rtti to get information about class fields of a generic type. After quite some googleing I found an entry in QC describing the issue. My question is, if anybody knows a workaro...
Figwort asked 6/12, 2011 at 18:41

4

Solved

Is there a reason why std::type_info is specified to be polymorphic? The destructor is specified to be virtual (and there's a comment to the effect of "so that it's polymorphic" in The Design and E...
Jarredjarrell asked 8/10, 2010 at 11:32

1

Solved

I have a class with published props which I serialize into XML. MyAttr = class(TCustomAttribute) private FName: string; public constructor Create(const Name: string); property Name: string read...
Inventor asked 23/11, 2011 at 8:49

3

Solved

First, a little explanation about my situation: I have a sample interface which is implemented by different classes, and these classes might not always have a shared ancestor: IMyInterface = int...
Sikhism asked 16/11, 2011 at 20:12

1

I'm developing a game engine in C++ that allows Python scripting. Here's an example of how functions can be defined in Python that are then called by the an event manager whenever a certain event o...
Drawback asked 30/10, 2011 at 7:55

1

Solved

I'm actually trying to use Rtti to implent a generic method invoker. It should work like this: I'll provide the class name, method name, and arguments the invoker will do its work by invoking the...
Clef asked 20/10, 2011 at 11:34

2

Solved

Given the following code snippet below, using GetPropValue(MyComponent,'MySubComponent.Prop1') raises an EPropertyError exception. How can I retrieve or set the values of SubProperties using GetPro...
Receptive asked 4/10, 2011 at 14:52

1

Solved

Given a class and subclass: class Event {...} class Note : public Event {...} A Note is Cloned and stored in a pointer within a function f(). The type-information is preserved in the pointer and...
Whipstock asked 30/8, 2011 at 10:9

© 2022 - 2024 — McMap. All rights reserved.