Questions tagged [rtti]
Run-Time Type Information: A C++ mechanism that exposes information about an object's data type at runtime.
5
questions
1
vote
1
answer
87
views
Verified downcasting if RTTI is active
In an application that uses heavily polymorphic classes, I have often the need to downcast a pointer or a reference to the correct derived class. They should always be of the correct derived class, ...
4
votes
1
answer
162
views
Is there a better solution to get RTTI info about a polymorphic type?
I made some code to get RTTI information of a polymorphic object, it works both if you pass it directly or a pointer to it(the pointer will get dereferenced until null or the object is found), it's ...
1
vote
2
answers
345
views
Map a set of types to unique IDs and runtime reinterpret back from ID and pointer in C++17
I wanted to create a relatively universal way of serialising an object, by doing a memcpy and generating a unique type ID. Stored together they can be used, for ...
2
votes
1
answer
2k
views
Drill through and down the object properties with RTTI
I am in process of making debugging output better for client-side application. We have lots of auto-generated Protocol Buffers classes which are used for communication by our protocol.
I am trying to ...
20
votes
2
answers
11k
views
Unique type ID, no RTTI
Following my answer to Unique type ID in C++, I have worked towards a "safer" version that I am posting here.
This is a lightweight type that can store a unique (also across compilation units) ID per ...