Skip to content
Snippets Groups Projects
  • Rene Brun's avatar
    57883809
    From Axel: · 57883809
    Rene Brun authored
    the static TRef::SetObject() works on TRef::fgObject, and is a misnomer
    wrt TRef::GetObject(), which works on the referenced object. This patch
    names the access to the referenced object GetObject(), while the access
    to the static fgObject will be called Get/SetStaticObject(), where
    GetStaticObject() is a new function.
    
    TRef::SetObject is kept (for the time being) for back compatibility.
    
    I did not implement TRef::SetObject(const TObject*) (as an alias to
    operator=(const TObject*)) to ensure that this interface change will
    result in a compiler error if the old TRef::SetObject (now
    TRef::SetStaticObject) is used.
    
    Also, TRef::GetObject() now sets fgObject to "this" before calling the
    TExec, allowing the TExec to access the TRef's fUniqueID, so it can
    determine which object needs to be dereferenced. I need this for storing
    the documentation objects.
    
    Docs and the tutorial GetWebHistogram are updated accordingly.
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@12543 27541ba8-7e3a-0410-8455-c3a389f83636
    57883809
    History
    From Axel:
    Rene Brun authored
    the static TRef::SetObject() works on TRef::fgObject, and is a misnomer
    wrt TRef::GetObject(), which works on the referenced object. This patch
    names the access to the referenced object GetObject(), while the access
    to the static fgObject will be called Get/SetStaticObject(), where
    GetStaticObject() is a new function.
    
    TRef::SetObject is kept (for the time being) for back compatibility.
    
    I did not implement TRef::SetObject(const TObject*) (as an alias to
    operator=(const TObject*)) to ensure that this interface change will
    result in a compiler error if the old TRef::SetObject (now
    TRef::SetStaticObject) is used.
    
    Also, TRef::GetObject() now sets fgObject to "this" before calling the
    TExec, allowing the TExec to access the TRef's fUniqueID, so it can
    determine which object needs to be dereferenced. I need this for storing
    the documentation objects.
    
    Docs and the tutorial GetWebHistogram are updated accordingly.
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@12543 27541ba8-7e3a-0410-8455-c3a389f83636