-macros and functions and wxWindows is no exception. As it originated before the
-addition of RTTI to the standard C++ and as support for it still missing from
-some (albeit old) compilers, wxWindows doesn't (yet) use it, but provides its
+macros and functions and wxWidgets is no exception. As it originated before the
+addition of RTTI to the C++ standard and as support for it is still missing from
+some (albeit old) compilers, wxWidgets doesn't (yet) use it, but provides its
own macro-based RTTI system.
In the future, the standard C++ RTTI will be used though and you're encouraged
own macro-based RTTI system.
In the future, the standard C++ RTTI will be used though and you're encouraged
classes only and only works with pointers (unlike the real dynamic\_cast<> which
also accepts references).
classes only and only works with pointers (unlike the real dynamic\_cast<> which
also accepts references).
a macro such as DECLARE\_DYNAMIC\_CLASS just inside the class declaration.
The macro IMPLEMENT\_DYNAMIC\_CLASS should be in the implementation file.
Note that these are entirely optional; use them if you wish to check object
types, or create instances of classes using the class name. However,
it is good to get into the habit of adding these macros for all classes.
a macro such as DECLARE\_DYNAMIC\_CLASS just inside the class declaration.
The macro IMPLEMENT\_DYNAMIC\_CLASS should be in the implementation file.
Note that these are entirely optional; use them if you wish to check object
types, or create instances of classes using the class name. However,
it is good to get into the habit of adding these macros for all classes.
classes that cannot be instantiated dynamically or otherwise.
DECLARE\_DYNAMIC\_CLASS inserts a static wxClassInfo declaration into the
classes that cannot be instantiated dynamically or otherwise.
DECLARE\_DYNAMIC\_CLASS inserts a static wxClassInfo declaration into the
The function \helpref{wxCreateDynamicObject}{wxcreatedynamicobject} can be used
to construct a new object of a given type, by supplying a string name.
If you have a pointer to the wxClassInfo object instead, then you
The function \helpref{wxCreateDynamicObject}{wxcreatedynamicobject} can be used
to construct a new object of a given type, by supplying a string name.
If you have a pointer to the wxClassInfo object instead, then you