Term
What does RTTI stand for? |
|
Definition
runtime type identification |
|
|
Term
What is the purpose of RTTI? |
|
Definition
provide a standard way for a program to determine the type of object during runtime |
|
|
Term
What are the three components that support RTTI? |
|
Definition
dynamic_cast, typeid, type_info |
|
|
Term
|
Definition
class hierarchy that has virtual functions |
|
|
Term
What does dynamic_cast do? |
|
Definition
tells whether you can safely assign the address of an object to a point of a particular type |
|
|
Term
What does the typeid operator let you do? |
|
Definition
determine whether two objects are the same type |
|
|
Term
What arguments do typeid accept? |
|
Definition
The name of a class An expression that evaluates to an object |
|
|
Term
what does typeid operator return? |
|
Definition
a reference to a type_info object |
|
|
Term
what header file is the class type_info defined in? |
|
Definition
|
|
Term
What operators does type_info overload? |
|
Definition
== and != so you can use these operators to compare types ex. typeid(Magnificent) == typeid(*pg) |
|
|
Term
|
Definition
implementation-dependent string that is typically the name of the class ex cout << "Now processing type " << typeid(*pg).name(); |
|
|
Term
|
Definition
Is set to 1 if end-of-file reached |
|
|
Term
|
Definition
Is set to 1 if the stream may be corrupted; for example, there could have been a file read error |
|
|
Term
|
Definition
Is set to 1 if an input operation failed to read the expected characters or an output operation failed to write the expected characters |
|
|
Term
|
Definition
|
|
Term
|
Definition
returns true if the stream can be used (all bits are cleared) |
|
|
Term
|
Definition
returns true if eofbit is set |
|
|
Term
|
Definition
returns true if badbit is set |
|
|
Term
|
Definition
returns true if badbit or failbit is set |
|
|
Term
|
Definition
|
|
Term
|
Definition
sets which states will cause clear() to throw an exception; for example, if ex is eofbit, then clear() will throw an exception if eofbit is set |
|
|
Term
|
Definition
sets the stream state to s; the default for s is 0 (goodbit); throws a basic_ios::failure exception if rdstate() & exceptions()) != 0 |
|
|
Term
|
Definition
Calls clear(rdstate() | s). This sets stream state bits corresponding to those bits set in s; other stream state bits are left unchanged |
|
|