Logo ROOT   6.12/07
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE > Class Template Reference

template<class PRIMITIVE>
class ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >

Definition at line 82 of file TDrawingAttrs.hxx.

Public Member Functions

 TDrawingAttrAndUseCount ()
 Default constructor: a default-constructed value that is unused. More...
 
 TDrawingAttrAndUseCount (const PRIMITIVE &val)
 Initialize with a value, setting use count to 1. More...
 
void Create (const PRIMITIVE &val)
 Create a value, initializing use count to 1. More...
 
void DecrUse ()
 Decrease the use count; use count must be >= 1 before the call. Calls Clear() if use count drops to 0. More...
 
PRIMITIVE & Get ()
 Value access (non-const). More...
 
const PRIMITIVE & Get () const
 Value access (const). More...
 
void IncrUse ()
 Increase the use count; use count must be >= 1 before (i.e. does not create or "resurrect" values). More...
 
bool IsFree () const
 Whether the use count is 0 and this object has space for a new value. More...
 

Private Member Functions

void Clear ()
 Clear the value; use count must be 0. More...
 

Private Attributes

size_t fUseCount = 1
 The value's use count. More...
 
PRIMITIVE fVal
 The value. More...
 

#include <ROOT/TDrawingAttrs.hxx>

Constructor & Destructor Documentation

◆ TDrawingAttrAndUseCount() [1/2]

template<class PRIMITIVE >
ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::TDrawingAttrAndUseCount ( )
inline

Default constructor: a default-constructed value that is unused.

Definition at line 93 of file TDrawingAttrs.hxx.

◆ TDrawingAttrAndUseCount() [2/2]

template<class PRIMITIVE >
ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::TDrawingAttrAndUseCount ( const PRIMITIVE &  val)
inlineexplicit

Initialize with a value, setting use count to 1.

Definition at line 96 of file TDrawingAttrs.hxx.

Member Function Documentation

◆ Clear()

template<class PRIMITIVE >
void ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::Clear ( )
private

Clear the value; use count must be 0.

Definition at line 102 of file TDrawingAttrs.cxx.

◆ Create()

template<class PRIMITIVE >
void ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::Create ( const PRIMITIVE &  val)

Create a value, initializing use count to 1.

Definition at line 113 of file TDrawingAttrs.cxx.

◆ DecrUse()

template<class PRIMITIVE >
void ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::DecrUse ( )

Decrease the use count; use count must be >= 1 before the call. Calls Clear() if use count drops to 0.

Definition at line 135 of file TDrawingAttrs.cxx.

◆ Get() [1/2]

template<class PRIMITIVE >
PRIMITIVE& ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::Get ( )
inline

Value access (non-const).

Definition at line 111 of file TDrawingAttrs.hxx.

◆ Get() [2/2]

template<class PRIMITIVE >
const PRIMITIVE& ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::Get ( ) const
inline

Value access (const).

Definition at line 114 of file TDrawingAttrs.hxx.

◆ IncrUse()

template<class PRIMITIVE >
void ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::IncrUse ( )

Increase the use count; use count must be >= 1 before (i.e. does not create or "resurrect" values).

Definition at line 125 of file TDrawingAttrs.cxx.

◆ IsFree()

template<class PRIMITIVE >
bool ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::IsFree ( ) const
inline

Whether the use count is 0 and this object has space for a new value.

Definition at line 108 of file TDrawingAttrs.hxx.

Member Data Documentation

◆ fUseCount

template<class PRIMITIVE >
size_t ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::fUseCount = 1
private

The value's use count.

Definition at line 86 of file TDrawingAttrs.hxx.

◆ fVal

template<class PRIMITIVE >
PRIMITIVE ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >::fVal
private

The value.

Definition at line 84 of file TDrawingAttrs.hxx.

Libraries for ROOT::Experimental::Internal::TDrawingAttrAndUseCount< PRIMITIVE >:
[legend]

The documentation for this class was generated from the following files: