16 #ifndef ROOT7_TDrawable 17 #define ROOT7_TDrawable 23 namespace Experimental {
29 class TVirtualCanvasPainter;
45 virtual void Execute(
const std::string &);
85 new (&
fShared) std::shared_ptr<T>(std::move(rhs.fShared));
107 fWeak = std::move(rhs.fWeak);
108 auto shptr = rhs.fWeak.lock();
111 fUnique = std::move(rhs.fUnique);
119 Accessor
Get()
const {
return Accessor(*
this); }
Accessor(const TUniWeakPtr &uniweak)
virtual void Paint(Internal::TVirtualCanvasPainter &onCanv)=0
virtual void Execute(const std::string &)
Base class for drawable entities: objects that can be painted on a TPad.
Namespace for new ROOT classes and functions.
TUniWeakPtr(TUniWeakPtr &&rhs)
T * fWeakForIO
Cannot save for now :-(.
bool fIsShared
fRaw or fShared?
Gives transparent access to the shared or unique pointer.
std::unique_ptr< T > fUnique
std::shared_ptr< T > fShared
The shared_ptr accessing a TUniWeak's weak_ptr.
T * fRaw
The raw, non-owning pointer accessing a TUniWeak's unique_ptr.
TUniWeakPtr(std::unique_ptr< T > &&ptr)
Abstract interface for painting a canvas.
TUniWeakPtr(const std::shared_ptr< T > &ptr)
bool fIsWeak
fUnique or fWeak?
virtual void PopulateMenu(TMenuItems &)
Method can be used to provide menu items for the drawn object.