rtti Questions
3
I need know type variable TDateTime, TDate and TTime.
Anyone have any idea how to do this?
I used the code below, the result is "Is NOT TDateTime", "Is NOT TDate", "Is NOT Ttime"
program Projec...
2
Solved
I cannot find the answer to this seemingly simple question anywhere.
Does the following C++ function use RTTI? It certainly doesn't have to, but I was wondering if there is a guarantee that typei...
3
Solved
Some say the use of dynamic_cast often means bad design and dynamic_cast can be replaced by virtual functions
why is the use of dynamic_cast considered bad design?
Suppose I have I function name ...
Dung asked 26/8, 2013 at 8:0
1
Solved
imagine, you want to assign your own event procedure:
procedure TSuperObject.DoSomething(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ShowMessage('Yes, I am do...
1
Solved
As we can find a Property or an Object using RTTI, can we search for a certain function or procedure (not from an object as a method but from an unit) loaded in memory knowing just it's name?
And ...
Sexagesimal asked 5/8, 2013 at 8:35
3
Solved
I know by TMS Aurelius that we can use the "new" 2010 attributes feature to serialize database table fields into object properties at run-time, for example, and I am not an expert on this deep obje...
Stationmaster asked 27/7, 2013 at 13:14
7
Solved
I've heard a lot about the new/improved RTTI capabilities of Delphi 2010, but I must admit my ignorance...I don't understand it. I know every version of Delphi has supported RTTI...and I know that ...
Office asked 7/2, 2010 at 14:32
2
Solved
In the following type:
MyClass = class(TInterfacedPersistent)
private
FMyProperty: Integer;
published
procedure setMyProperty(Value: Integer); virtual;
property MyProperty: Integer read FMyPro...
Valer asked 17/7, 2013 at 2:45
1
Solved
Lets say I have a sample class helper
TSampleClassHelper = class helper for TSampleClass
public
procedure SomeHelper;
end;
I do the following:
var
obj :TSampleClass;
begin
obj:=TSampleClass....
Dispassionate asked 21/6, 2013 at 19:57
1
Solved
I have class B that inherits from A.
class A
{
};
class B : public A
{
};
And I have three objects.
A* a = new A();
A* a2 = new B();
B* b = new B();
I'd like to if check a is object of type ...
1
I would like to access the following property using RTTI
MyComponent1.Property['variable'].SubProperty
I would like something like that:
var
Ctx: TRttiContext;
Typ: TRttiType;
SubTyp: TRttiT...
Bandwidth asked 5/6, 2013 at 19:22
1
Solved
My question is when how does the class info gets loaded during runtime?
When someone calls instanceof is that considered RTTI or reflection? Or it depends on the actual situation?
Pallmall asked 14/5, 2013 at 22:24
2
Solved
I am a newbie in the study of advanced C++ topics so please pardon me if the question sounds too obvious.
I have been reading about the various methods by which we can get the information of the t...
1
Solved
Is it meant to be guaranteed that same std::type_info::hash_code() values imply same types?
Cplusplus.com seems to claim so:
This function returns the same value for any two type_info objects that...
Tetrahedron asked 27/4, 2013 at 14:25
1
Solved
I'm trying to use TVirtualInterface. I've mostly tried to follow the examples at the Embarcadero doc wiki and at Nick Hodges' blog.
However, What I'm trying to do is a little bit different from th...
Artless asked 16/4, 2013 at 23:18
3
Solved
I have a tree where each node basically looks like this:
struct node
{
std::unordered_set<object*> objects;
std::map<std::type_index,node> children;
};
When i iterate over the tree...
1
Solved
I have values stored in xml and lua code and accessing object's properties through RTTI.
var
o, v: TValue; // o is current object
a: TStringDynArray; // params as array
ctx: TRttiContext;
tt: ...
2
Solved
I am trying to subclass from a shared library which was compiled with -fno-rtti. Unfortunately other libraries in my code base require -frtti. As a result I am getting link errors because the super...
1
I have this test program https://gist.github.com/real-mielofon/5002732
RttiValue := RttiMethod.Invoke(RttiInstance, [10]);
and simple unit with interface:
unit Unit163;
interface
type
{$M+...
Loudish asked 21/2, 2013 at 6:40
4
Solved
Which of these pieces of code is faster?
if (obj is ClassA) {}
if (obj.GetType() == typeof(ClassA)) {}
Edit:
I'm aware that they don't do the same thing.
4
Solved
Which of these pieces of code is faster?
if (obj is ClassA) {}
if (obj.GetType() == typeof(ClassA)) {}
Edit:
I'm aware that they don't do the same thing.
3
Solved
I find myself using a common run-time type identification pattern, especially when writing code that handles controls of varying types. Here is the pattern:
if (ctrl is ControlTypeEtc)
(ctrl as C...
2
Solved
I want to create a form given its class name as a string, which has been asked about before, but instead of calling GetClass, I want to use Delphi's new RTTI feature.
With this code, I've got a TR...
Sketchy asked 7/2, 2013 at 2:24
1
Is it possible to obtain RTTI information about a TMethod?
I can get the instance by
Instance := TObject(Method.Data);
so I can get the RTTI type of the instance, but how can I get the correct ...
Sierra asked 5/2, 2013 at 10:16
3
Solved
I am using a property inspector (for example the nice JvInspector in the JVCL library) which nicely lets me view and edit the published properties of my class 'TMyClass'. TMyClass descends from TFr...
Macomber asked 24/1, 2013 at 11:46
© 2022 - 2024 — McMap. All rights reserved.