Opentopia Directory Encyclopedia Tools

Run-time type information

Encyclopedia : R : RU : RUN : Run-time type information


In programming, Runtime Type Information (RTTI, RunTime Type Identification) means keeping information about an object's datatype memory at runtime. Some implementations may be limited to keeping the inheritance tree while others may also incude information about objects' methods and attributes

Run Time Type Information is a computer programming term used to identify that a given language has the ability to determine the type of a program's object/variable at runtime.

Although available in most computer languages, RTTI, as a term, is typically used in relation to C++. In order for the dynamic_cast<> operation or the type_info operator to work in C++, RTTI must be enabled.

Example in C++

An instance where RTTI is used is illustrated below:


class base 
};

class derived : public base int compare(derived &ref); };

int my_comparison_method_for_generic_sort(base &ref1, base &ref2)

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: