Skip to content
Snippets Groups Projects
Commit 3d331a83 authored by Rene Brun's avatar Rene Brun
Browse files

From Philippe:

This patch adds the ability to use a global IsA function to handle the
execution of TClass::GetActualClass.

   // This function installs a global IsA function for this class.
   // The global IsA function will be used if there is no local IsA function (fIsA)
   //
   // A global IsA function has the signature:
   //
   //    TClass *func( TClass *cl, const void *obj);
   //
   // 'cl' is a pointer to the  TClass object that corresponds to the
   // 'pointer type' used to retrieve the value 'obj'
   //
   //  For example with:
   //    TNamed * m = new TNamed("example","test");
   //    TObject* o = m
   // and
   //    the global IsA function would be called with TObject::Class() as
   //    the first parameter and the exact numerical value in the pointer
   //    'o'.
   //
   //  In other word, inside the global IsA function. it is safe to C-style
   //  cast the value of 'obj' into a pointer to the class described by 'cl'.


git-svn-id: http://root.cern.ch/svn/root/trunk@7956 27541ba8-7e3a-0410-8455-c3a389f83636
parent 72cc79fe
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment