473,395 Members | 2,783 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,395 software developers and data experts.

can i keep the reference to a type_info class

hi,

with RTTI turned on... can i keep the reference to the type_info so that i can pass it around? i want to pass something to a function that will pick out a specific type of object from a pool of objects with the same base class.

thanks
Nov 16 '05 #1
1 1038
Yes, you can. All type_info objects are static and exists for the life of
the program.
-cd

tham wrote:
hi,

with RTTI turned on... can i keep the reference to the type_info so
that i can pass it around? i want to pass something to a function
that will pick out a specific type of object from a pool of objects
with the same base class.

thanks

Nov 16 '05 #2

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

Similar topics

54
by: sks_cpp | last post by:
What is a type_info function, more particularly, what is a type_info node? Are these related to the vtable by any means? I have seen linker errors such as: "undefined reference to SomeClass...
5
by: skscpp | last post by:
I "think" I understand why a virtual table needs to be constructed when polymorphic classes are being compiled. Now, I also know what a type_info function and type_info node are although I am...
3
by: Bobo | last post by:
Hello all. Can anybody explay WTH std::type_info has a virtual destructor? AFAIK the constructor is private so you cannot inherit from it (who would want, anyway?). TIA. Bobo.
12
by: Andrew Schepler | last post by:
When compiled with Visual C++ .NET 2003 (only), the program below aborts as though no matching catch clause is present. If the copy constructor of A is made public, it successfully catches the...
1
by: jahhaj | last post by:
Lots of people seem to have problems with these, here's my particular variation. I'm using a third partly library which I believe was compiled with VC 7.1. I'm using the free version of VC 8 and...
7
by: Gary Wessle | last post by:
Hi can I reference the class name from within the object? thanks
3
by: buu | last post by:
It's dummy question, I know, but wanna be sure... is this a proper way to keep a reference to an object: public class Class1 private o1 as Object1 public sub New(byref vO as object1)...
9
by: Rahul | last post by:
Hi Everyone, I was working with Run Time Type Information and with typeid operator, and so on i tried to create an object of type_info class and i'm not able to do so, because of the class...
2
by: sumsin | last post by:
What is type_info object?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.