Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Browsable::RShared< T > Class Template Reference

template<class T>
class ROOT::Experimental::Browsable::RShared< T >

Definition at line 27 of file RShared.hxx.

Public Member Functions

 RShared (std::shared_ptr< T > &&obj)
 
 RShared (std::shared_ptr< T > obj)
 
 RShared (T *obj)
 
virtual ~RShared ()=default
 
const TClassGetClass () const final
 Returns class of contained object.
 
const voidGetObject () const final
 Returns direct (temporary) object pointer.
 
- Public Member Functions inherited from ROOT::Experimental::Browsable::RHolder
virtual ~RHolder ()=default
 
template<class T >
bool CanCastTo () const
 
auto Copy () const
 Clone container.
 
template<class T >
const T * Get () const
 Returns direct object pointer cast to provided class.
 
template<class T >
T * get_object ()
 Returns plains pointer on object without ownership, only can be used for TObjects.
 
template<class T >
std::shared_ptr< T > get_shared ()
 Returns shared_ptr of contained object.
 
template<class T >
std::unique_ptr< T > get_unique ()
 Returns unique_ptr of contained object.
 
template<class T >
bool InheritsFrom () const
 

Protected Member Functions

RHolderDoCopy () const final
 Create copy of container, works only when pointer can be shared.
 
voidGetShared () const final
 Returns pointer on existing shared_ptr<T>
 
- Protected Member Functions inherited from ROOT::Experimental::Browsable::RHolder
virtual voidAccessObject ()
 Returns plain object pointer without care about ownership, should not be used often.
 
virtual voidTakeObject ()
 Returns pointer with ownership, normally via unique_ptr<T>::release() or tobj->Clone()
 

Private Attributes

std::shared_ptr< T > fShared
 ! holder without IO
 

#include <ROOT/Browsable/RShared.hxx>

Inheritance diagram for ROOT::Experimental::Browsable::RShared< T >:
[legend]

Constructor & Destructor Documentation

◆ RShared() [1/3]

template<class T >
ROOT::Experimental::Browsable::RShared< T >::RShared ( T *  obj)
inline

Definition at line 33 of file RShared.hxx.

◆ RShared() [2/3]

template<class T >
ROOT::Experimental::Browsable::RShared< T >::RShared ( std::shared_ptr< T >  obj)
inline

Definition at line 34 of file RShared.hxx.

◆ RShared() [3/3]

template<class T >
ROOT::Experimental::Browsable::RShared< T >::RShared ( std::shared_ptr< T > &&  obj)
inline

Definition at line 35 of file RShared.hxx.

◆ ~RShared()

template<class T >
virtual ROOT::Experimental::Browsable::RShared< T >::~RShared ( )
virtualdefault

Member Function Documentation

◆ DoCopy()

template<class T >
RHolder * ROOT::Experimental::Browsable::RShared< T >::DoCopy ( ) const
inlinefinalprotectedvirtual

Create copy of container, works only when pointer can be shared.

Reimplemented from ROOT::Experimental::Browsable::RHolder.

Definition at line 31 of file RShared.hxx.

◆ GetClass()

template<class T >
const TClass * ROOT::Experimental::Browsable::RShared< T >::GetClass ( ) const
inlinefinalvirtual

Returns class of contained object.

Implements ROOT::Experimental::Browsable::RHolder.

Definition at line 38 of file RShared.hxx.

◆ GetObject()

template<class T >
const void * ROOT::Experimental::Browsable::RShared< T >::GetObject ( ) const
inlinefinalvirtual

Returns direct (temporary) object pointer.

Implements ROOT::Experimental::Browsable::RHolder.

Definition at line 39 of file RShared.hxx.

◆ GetShared()

template<class T >
void * ROOT::Experimental::Browsable::RShared< T >::GetShared ( ) const
inlinefinalprotectedvirtual

Returns pointer on existing shared_ptr<T>

Reimplemented from ROOT::Experimental::Browsable::RHolder.

Definition at line 30 of file RShared.hxx.

Member Data Documentation

◆ fShared

template<class T >
std::shared_ptr<T> ROOT::Experimental::Browsable::RShared< T >::fShared
private

! holder without IO

Definition at line 28 of file RShared.hxx.

  • gui/browsable/inc/ROOT/Browsable/RShared.hxx