[Next] [Prev] [Up] [Top]

14.0 Type Conversions

If necessary, use type-safe casting (GL)


For Unix, where necessary, you can perform type-safe downcasting. This is applicable only for TObject and descendents. Never downcast outside the target class. If you have a class X, you can downcast using

X* xp = X::downCast (p);

Here if "p" points to a kind of X, then xp will have a non-NULL value. Otherwise it will be NULL. If "p" is NULL, NULL is returned. Note that this mechanism uses comparisons of "classname".


No Title
[Next] [Prev] [Up] [Top]

Generated with CERN WebMaker

This site was grabbed using the TRIAL version of Grab-a-Site. This message does not appear on a licensed copy of Grab-a-Site.