473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

understanding working of RTTI

hi there
i just went through with C++ faq and faq lite, it was great, but i was not
able to find much information on working of RTTI how it is handled
internally, i tried google search with some general keywords...but not of
much help...

any suggestions ??

also any suggestions for understanding C++ in a better way :-)

regards
-Dumboo
Jul 22 '05 #1
3 1366
"dumboo" <vt***@yahoo.com> writes:
hi there
i just went through with C++ faq and faq lite, it was great, but i was not
able to find much information on working of RTTI how it is handled
internally, i tried google search with some general keywords...but not of
much help...

any suggestions ??
Read Stroustrup's _The C++ Programming Language_, 3rd or SE, section
15.4 .

also any suggestions for understanding C++ in a better way :-)


Read the rest of the book. :-)
If you are a beginner, or don't mind re-learning some
material. Koenig and Moo's _Accelerated C++_ is quite helpful.
Jul 22 '05 #2
On Tue, 3 Feb 2004 10:03:53 +0530, "dumboo" <vt***@yahoo.com> wrote:
hi there
i just went through with C++ faq and faq lite, it was great, but i was not
able to find much information on working of RTTI how it is handled
internally, i tried google search with some general keywords...but not of
much help...

any suggestions ??


This book says quite a lot about how C++ is implemented. I haven't
read it but:
http://www.aw-bc.com/catalog/academi...834545,00.html

In general, it is implemented by adding some type information to the
vtable of a class, as well as some code to "walk" the class heirarchy
for dynamic_cast.

Tom

C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Jul 22 '05 #3
"tom_usenet" <to********@hotmail.com> wrote in message
news:c8********************************@4ax.com...
On Tue, 3 Feb 2004 10:03:53 +0530, "dumboo" <vt***@yahoo.com> wrote:
hi there
i just went through with C++ faq and faq lite, it was great, but i was notable to find much information on working of RTTI how it is handled
internally, i tried google search with some general keywords...but not ofmuch help...

any suggestions ??
This book says quite a lot about how C++ is implemented. I haven't
read it but:

http://www.aw-bc.com/catalog/academi...834545,00.html


I have read it, and I would recommend it with these caveats:

1. The C++ implementation strategies discussed are probably not
exhaustive, since the book was written some time ago. (I don't know
for sure, since unfortunately I am not familiar with the internals of
current implementations.)
2. In some places, the author is careful to distinguish between what
the (then emerging) standard requires, and what particular
implementation do; in other places, he leaves the impression that the
Cfront 2.0 implementation is part of the standard.
3. There are a few mistakes and a lot of typos.

Jonathan
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Rick | last post by:
Hi, I wrote a few classes recently and am writing a small GC implementation for C++. I will be implementing my own gc_ptr type maintain a list where I'll store pointers to allocated memory. I...
2
by: shishir | last post by:
Please consider the following //file test.cpp #include <iostream> int main() { int x; try { throw x;
6
by: Kleidemos | last post by:
If I implement a simple RTTI system, more simple than C++ RTTI system for my program and this system is plus or minus: #define DEF_RTTI_BASE(name) virtual inline const char *Name(){ return...
9
by: Agoston Bejo | last post by:
Hello there, I would like to know what overheads there are to think of when using RTTI. I understand that enabling RTTI increases the sizes of the classes, but not the objects themselves. This...
2
by: denny | last post by:
Hey all, I know that dynamic_cast<> takes some time, but , for instance, is there a memoy cost associated in with it? Does it have to maintain a table in memory, thus bloating the runtime ram...
3
by: Steven T. Hatton | last post by:
I'm trying to work out a design for dynamically determining file types, and for generating new files of a given type. I'm curious to know what others think of my current strategy. Is it "so...
10
by: Neo | last post by:
what is RTTI? and how to implements it? give me sourceful link for learn and implements it (using standard C mean portable). regards, -aims
5
by: dotNeter | last post by:
I'm studying the RTTI, and my current work is concern for how to get the self-defined type at runtime, that's exactly what the RTTI does. I mean, in my application, I built several self-defined...
2
by: Chameleon | last post by:
I know than dynamic_cast check string name of derived to base class and if one of them match, return the pointer of that object or else zero. I suppose, I dynamic_cast instead of strings, checks...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.