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

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

Definition at line 27 of file RUnique.hxx.

Public Member Functions

 RUnique (std::unique_ptr< T > &&obj)
 
 RUnique (T *obj)
 
virtual ~RUnique ()=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

voidTakeObject () final
 Returns pointer with ownership, normally via unique_ptr<T>::release() or tobj->Clone()
 
- 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 RHolderDoCopy () const
 Create copy of container, works only when pointer can be shared.
 
virtual voidGetShared () const
 Returns pointer on existing shared_ptr<T>
 

Private Attributes

std::unique_ptr< T > fUnique
 ! holder without IO
 

#include <ROOT/Browsable/RUnique.hxx>

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

Constructor & Destructor Documentation

◆ RUnique() [1/2]

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

Definition at line 32 of file RUnique.hxx.

◆ RUnique() [2/2]

template<class T >
ROOT::Experimental::Browsable::RUnique< T >::RUnique ( std::unique_ptr< T > &&  obj)
inline

Definition at line 33 of file RUnique.hxx.

◆ ~RUnique()

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

Member Function Documentation

◆ GetClass()

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

Returns class of contained object.

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

Definition at line 36 of file RUnique.hxx.

◆ GetObject()

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

Returns direct (temporary) object pointer.

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

Definition at line 37 of file RUnique.hxx.

◆ TakeObject()

template<class T >
void * ROOT::Experimental::Browsable::RUnique< T >::TakeObject ( )
inlinefinalprotectedvirtual

Returns pointer with ownership, normally via unique_ptr<T>::release() or tobj->Clone()

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

Definition at line 30 of file RUnique.hxx.

Member Data Documentation

◆ fUnique

template<class T >
std::unique_ptr<T> ROOT::Experimental::Browsable::RUnique< T >::fUnique
private

! holder without IO

Definition at line 28 of file RUnique.hxx.

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