X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4fcc2919776cffa5e3b2f0d44dd24c41e652ff4..8b2858410444b111cb192d1539ef6c76209091fd:/docs/latex/wx/truntime.tex diff --git a/docs/latex/wx/truntime.tex b/docs/latex/wx/truntime.tex index 32ce7c867e..04ee1e02a7 100644 --- a/docs/latex/wx/truntime.tex +++ b/docs/latex/wx/truntime.tex @@ -1,4 +1,4 @@ -\section{Run time class information overview}\label{runtimeclassoverview} +\section{Runtime class information (aka RTTI) overview}\label{runtimeclassoverview} Classes: \helpref{wxObject}{wxobject}, \helpref{wxClassInfo}{wxclassinfo}. @@ -9,19 +9,19 @@ just by knowing the name of a class, which makes facilities such as persistent storage hard to implement. Most C++ GUI frameworks overcome these limitations by means of a set of -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 -to use whenever possible \helpref{wxDynamicCast()}{wxdynamiccast} macro which, +to use whenever possible the \helpref{wxDynamicCast()}{wxdynamiccast} macro which, for the implementations that support it, is defined just as dynamic\_cast<> and -uses wxWindows RTTI for all the others. This macro is limited to wxWindows +uses wxWidgets RTTI for all the others. This macro is limited to wxWidgets classes only and only works with pointers (unlike the real dynamic\_cast<> which also accepts references). -Each class that you wish to be known the type system should have +Each class that you wish to be known to the type system should have 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 @@ -50,11 +50,11 @@ to return an appropriate wxClassInfo pointer to use in this function. 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 -can simply call wxClassInfo::CreateObject. +can simply call \helpref{wxClassInfo::CreateObject}{wxclassinfocreateobject}. \subsection{wxClassInfo}\label{wxclassinfooverview} -\overview{Run time class information overview}{runtimeclassoverview} +\overview{Runtime class information (aka RTTI) overview}{runtimeclassoverview} Class: \helpref{wxClassInfo}{wxclassinfo} @@ -78,7 +78,7 @@ You can get the wxClassInfo for an object using wxObject::GetClassInfo. See also \helpref{wxObject}{wxobject} and \helpref{wxCreateDynamicObject}{wxcreatedynamicobject}. -\subsection{Example} +\subsection{Example}\label{runtimeclassinformationexample} In a header file frame.h: