rtti Questions
1
Solved
In a Delphi class I have some properties that I would like to set by accessing them by their name.
Now I use e.g. Settings.AllowSysop := True;
That I would like to do something like Settings('Allo...
Trinitroglycerin asked 16/1, 2013 at 6:59
1
I have this class:
{$RTTI EXPLICIT FIELDS([vcProtected]) PROPERTIES([vcProtected])}
const
PP_VEHICLE_FIELD = 'VEICULO_ID';
PP_DRIVER_FIELD = 'MOTORISTA_ID';
PP_TRIP_FIELD = 'VIAGEM_ID';
PP_DAT...
Waechter asked 29/2, 2012 at 12:24
3
Solved
Consider the following:
struct B { };
template<typename T>
struct D : B
{
T t;
}
void g(int i) { ... }
void g(string s) { ... }
void g(char c) { ... }
void f(B* b)
{
if (dynamic_cast<...
4
Is there a way to explore a interface's properties with Rtti?
The following code does not work:
procedure ExploreProps;
var
Ctx: TRttiContext;
RttiType: TRttiType;
RttiProp: TRttiProp;
begin
...
2
Solved
I'm still working on a good solution to my One-Of-A-Type Container Problem -- and upon reflection I think it would be nice to be able to just use something like a std::map<std::type_info, boost:...
Unicorn asked 23/8, 2010 at 22:16
1
I use Boost::iostreams to write simultaneously to my console and a file. When i use eclipse to debug(with gdb of course), i receive a warning which says RTTI symbol not found for one of the classes...
Disjuncture asked 20/10, 2012 at 7:19
2
Solved
I'm working in Delphi XE, windows 7.
In an application I want to enable different report types for my users to select.
To do this, I have 1 base report class and a subclass per report type (xml, c...
3
Solved
Can I enumerate the constants(const) from a class?
I have tried
MyClass = class
const
c1 = 'c1';
c2 = 'c2';
c3 = 'c3';
end;
procedure GetConst();
var
ctx: TRttiContext;
objType: TRttiType;
...
3
Solved
I have this code:
class Class {
public:
virtual void first() {};
virtual void second() {};
};
Class* object = new Class();
object->first();
object->second();
delete object;
that I compi...
Mindy asked 18/9, 2012 at 7:48
9
Solved
I have a pretty simple question about the dynamic_cast operator. I know this is used for run time type identification, i.e., to know about the object type at run time. But from your programming exp...
1
Solved
In my Question:
How to use “Sender” parameter with “As” operator for more then one class at a time
I choose the Remy Lebeau's Answer because it was the most dynamic tech for most situations like t...
Mandate asked 30/7, 2012 at 19:14
3
Solved
I have a pointer to a polymorphic type, p. I also have a type_info for a class somewhere in the same hierarchy, ti.
If I just compare the typeid(*p) == ti, then I can test at runtime whether the p...
5
Solved
What, if any, c++ constructs are there for listing the ancestors of a class at runtime?
Basically, I have a class which stores a pointer to any object, including possibly a primitive type (somewh...
Walrus asked 9/8, 2011 at 7:7
5
Solved
i have use delphi xe recently but exe size is very big because of rtti(i think)
howto remove rtti , and can i make my application size as small as delphi 2009 application(490 kb) without comprssi...
Boche asked 20/10, 2010 at 6:35
3
Solved
I recently disabled RTTI on my compiler (MSVC10) and the executable size decreased significantly. By comparing the produced executables using a text editor, I found that the RTTI-less version conta...
Draught asked 9/7, 2012 at 21:5
3
Solved
Using Delphi 2010 and RTTI, I know how to get the class type of an object and how to get/set the value and type of an object's properties, but how do you determine which class in the inheritance ch...
Thaliathalidomide asked 5/7, 2012 at 18:43
1
Solved
I am using Delphi XE2 to communicate with a fairly large SOAP service. I've successfully imported the wsdl and everything is working just fine. However, I find myself writing a lot of similar code....
Dynamics asked 28/6, 2012 at 15:11
2
I am working with Delphi application.I created one form shown as below:
I wanted to make component out of this controls through code. But not through component-->create component Template-->so o...
1
Solved
I am trying to write class that inherits from FMX TStyledControl. When style is updated it loads style resource objects to cache.
I created project group for package with custom controls and test ...
Dandiprat asked 4/6, 2012 at 10:37
3
Solved
I'm trying to discover the most-derived class of an object, within a constructor of one of the classes in its inheritance tree. I've spent several hours on this now and am at a loss for how else I ...
3
Solved
I've found a simple solution somewhere on the internet to an identity class without built-in C++ RTTI.
template <typename T>
class Identity {
public:
static int64_t id()
{
static int64_t ...
1
Solved
I'm trying to get hold of an object using TRttiContext.FindType(QualifiedTypeName). Here's what I've got:
program MissingRTTI;
{$APPTYPE CONSOLE}
uses System.SysUtils, RTTI, Classes;
type
TMyClas...
Echelon asked 15/5, 2012 at 11:57
1
Solved
I wrote a scriptlanguage for my applications and my goal is to make it possible to publish any type from delphi in the script. I use rtti to automatize this task. For any instance type like classes...
2
Solved
I have a class in my Delphi app where I would like an easy and dynamic way of resetting all the string properties to '' and all the boolean properties to False
As far as I can see on the web it sho...
Threemaster asked 17/4, 2012 at 9:18
1
Solved
I'm creating an instance of a class using the TRttiMethod.Invoke function , but when the constructor or a method is overloaded, the rtti does not call the proper method.
I wrote a sample app to il...
Klopstock asked 10/4, 2012 at 5:20
© 2022 - 2024 — McMap. All rights reserved.