472,784 Members | 976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

RTTI in C

Neo
what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).

regards,
-aims

Jul 26 '06 #1
10 4486
Neo said:
what is RTTI?
Since it's upper case, my money would be on a macro name.
and how to implements it?
#define RTTI 42

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 26 '06 #2
Neo <mo******@gmail.comwrote:
what is RTTI?
http://www.google.com/search?q=rtti
and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).
STFW.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Jul 26 '06 #3
funny.
Richard Heathfield wrote:
Neo said:
what is RTTI?

Since it's upper case, my money would be on a macro name.
and how to implements it?

#define RTTI 42

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 26 '06 #4

Neo wrote:
what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).

regards,
-aims
If you don't know what it is, why do you want to know how to implement
it? What were you planning on using it for?

Jul 26 '06 #5


Neo wrote On 07/26/06 10:45,:
what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).
Round Trip Time Inconsistency. This is a reference to
the so-called "twin paradox" of Special Relativity, in which
one twin takes a high-speed journey while leaving the other
behind, and upon return discovers that their ages are no
longer the same.

RTTI cannot be implemented in strictly conforming C
because of the requirement that the travelling twin must
move at high speed. The C Standard says nothing about
speed, which is purely an artifact of the implementation
and not a property of the language. Therefore, any attempt
to demonstrate RTTI necessarily involves the implementation-
dependent concept of "speed" and is thus non-portable.

--
Er*********@sun.com

Jul 26 '06 #6
Eric Sosman said:
>

Neo wrote On 07/26/06 10:45,:
>what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).

Round Trip Time Inconsistency. This is a reference to
the so-called "twin paradox" of Special Relativity, in which
one twin takes a high-speed journey while leaving the other
behind, and upon return discovers that their ages are no
longer the same.

RTTI cannot be implemented in strictly conforming C
because of the requirement that the travelling twin must
move at high speed.
But it could be modelled to a satisfactory degree of accuracy.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 26 '06 #7
Eric Sosman wrote:
>
Neo wrote On 07/26/06 10:45,:
>>what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).


Round Trip Time Inconsistency. This is a reference to
the so-called "twin paradox" of Special Relativity, in which
one twin takes a high-speed journey while leaving the other
behind, and upon return discovers that their ages are no
longer the same.
There's a time inconsistency between wanting to implement something
before knowing what that something is!

Did I get it? ;-)

with respect,
Toni Uusitalo

Jul 26 '06 #8
Run-time type identification

"Neo" <mo******@gmail.com>
??????:11**********************@s13g2000cwa.google groups.com...
what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).

regards,
-aims

Jul 27 '06 #9
On Wed, 26 Jul 2006 14:53:52 +0000, Richard Heathfield
<in*****@invalid.invalidwrote:
>Neo said:
>what is RTTI?

Since it's upper case, my money would be on a macro name.
>and how to implements it?

#define RTTI 42
I get a similar result, and I'm prepared for changes.

#define RUN 1
#define TIME 5
#define TYPE 12
#define INFORMATION 24
#define R RUN
#define T1 TIME
#define T2 TYPE
#define I INFORMATION
#define RTTI (R + T1 + T2 + I)

Regards
--
jay
Jul 27 '06 #10
Bright He wrote:
Run-time type identification
1. Don't top-post. Your reply belongs following or interspersed with
properly trimmed quotes.

2. Your answer is incorrect. It does NOT mean that in C, as there is no
such thing.

Brian
Jul 27 '06 #11

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...
3
by: Neo | last post by:
Hi Friends, I have a question about RTTI. 1) In C++ we have vptr pointing to vtables which helps to make use of pointer as polymorphic entities. 2) Without knowing object type I can call methods...
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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

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.