what is RTTI? and how to implements it? give me sourceful link for
learn and implements it (using standard C mean portable).
regards,
-aims 10 4553
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)
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)gma il.com | don't, I need to know. Flames welcome.
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)
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?
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
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)
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
Run-time type identification
"Neo" <mo******@gmail .com>
??????:11****** *************** *@s13g2000cwa.g ooglegroups.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
On Wed, 26 Jul 2006 14:53:52 +0000, Richard Heathfield
<in*****@invali d.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 was wondering if it is
possible to identify objects during runtime via RTTI because I don't
want to be doing:
gc_ptr<int>::doGC();
gc_ptr<double>::doGC();
|
by: shishir |
last post by:
Please consider the following
//file test.cpp
#include <iostream>
int main()
{
int x;
try
{
throw x;
|
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
#name; }
#define DEF_RTTI(name) inline const char *Name(){ return #name; }
And(for example)
class CProva
|
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 doesn't sound too bad.
What I'm worried about is whether there is a general performance overhead
caused by enabling RTTI, such as enabling exceptions makes a C++ program
slower even when there are no exceptions actually used.
Are there similar...
|
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 needs of my dll? Does it bloat the actual download size - would my dll be smaller without it?
thanks - I'm using rtti in some instances, but I jsut want to know if it's costing me hundreds of K in extra download.
-denny-
| |
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 einfach wie möglich machen, aber
nicht einfacher" or "Rube Goldberg"?
The first part of this has to do with a technique used in the C++ Standard
Library, so I suspect the purist will not have any objection. It's the
approach used to build the...
|
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 of object using
those pointers.
So in which case RTTI is needed? ( Why I need to know my object
type?)
Regards,
|
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 data types, so
I have to implement the RTTI by myself.
I need a simple and effective example to help me decide how to design.
Can someon help me?
|
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 integers, then this
procedure will be more fast, so I create something like this:
---------------------------------------------
class A
{
public:
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |