9#ifndef ROOT7_Browsable_RHolder
10#define ROOT7_Browsable_RHolder
17namespace Experimental {
60 return TClass::GetClass<T>()->InheritsFrom(
GetClass());
66 return const_cast<TClass *
>(
GetClass())->GetBaseClassOffset(TClass::GetClass<T>()) >= 0;
82 auto Copy()
const {
return std::unique_ptr<RHolder>(
DoCopy()); }
94 std::unique_ptr<T> unique;
95 unique.reset((T *)((
char *) pobj +
offset));
110 return *(
static_cast<std::shared_ptr<T> *
>(pshared));
113 return get_unique<T>();
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Basic class for object holder of any kind.
virtual const TClass * GetClass() const =0
Returns class of contained object.
virtual RHolder * DoCopy() const
Create copy of container, works only when pointer can be shared.
std::shared_ptr< T > get_shared()
Returns shared_ptr of contained object.
virtual ~RHolder()=default
virtual void * AccessObject()
Returns plain object pointer without care about ownership, should not be used often.
bool InheritsFrom() const
const T * Get() const
Returns direct object pointer cast to provided class.
virtual const void * GetObject() const =0
Returns direct (temporary) object pointer.
virtual void * TakeObject()
Returns pointer with ownership, normally via unique_ptr<T>::release() or tobj->Clone()
T * get_object()
Returns plains pointer on object without ownership, only can be used for TObjects.
auto Copy() const
Clone container.
virtual void * GetShared() const
Returns pointer on existing shared_ptr<T>
std::unique_ptr< T > get_unique()
Returns unique_ptr of contained object.
TClass instances represent classes, structs and namespaces in the ROOT type system.
RLogChannel & BrowsableLog()
Log channel for Browsable diagnostics.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.