Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCollection.h File Reference
#include "TObject.h"
#include "TIterator.h"
#include "TString.h"
#include "TVirtualRWMutex.h"
#include "ROOT/RRangeCast.hxx"
#include <cassert>
Include dependency graph for TCollection.h:
This graph shows which files directly or indirectly include this file:

Classes

class  TCollection
 Collection abstract base class. More...
 
class  TIter
 
class  TIterCategory< T >
 
class  ROOT::Detail::TRangeCast< T, isDynamic >
 

Namespaces

namespace  ROOT
 tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tbb::task_arena without forward declaring tbb::interface7
 
namespace  ROOT::Detail
 Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target type inherits from TObject and a new constructor that takes the TCollection by pointer.
 
namespace  ROOT::Internal
 

Macros

#define R__COLL_COND_MUTEX(mutex)   this->IsUsingRWLock() ? mutex : nullptr
 
#define R__COLLECTION_ITER_GUARD(collection)
 
#define R__COLLECTION_READ_GUARD()
 
#define R__COLLECTION_READ_LOCKGUARD(mutex)   ::ROOT::TReadLockGuard _R__UNIQUE_(R__readguard)(R__COLL_COND_MUTEX(mutex))
 
#define R__COLLECTION_READ_LOCKGUARD_NAMED(name, mutex)   ::ROOT::TReadLockGuard _NAME2_(R__readguard,name)(R__COLL_COND_MUTEX(mutex))
 
#define R__COLLECTION_WRITE_GUARD()
 
#define R__COLLECTION_WRITE_LOCKGUARD(mutex)   ::ROOT::TWriteLockGuard _R__UNIQUE_(R__readguard)(R__COLL_COND_MUTEX(mutex))
 
#define R__COLLECTION_WRITE_LOCKGUARD_NAMED(name, mutex)   ::ROOT::TWriteLockGuard _NAME2_(R__readguard,name)(R__COLL_COND_MUTEX(mutex))
 
#define R__FOR_EACH(type, proc)
 

Typedefs

template<typename T >
using TRangeDynCast = ROOT::Detail::TRangeCast< T, true >
 TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
template<typename T >
using ROOT::Detail::TRangeStaticCast = TRangeCast< T, false >
 TRangeStaticCast is an adapter class that allows the typed iteration through a TCollection.
 

Functions

bool ROOT::Internal::ContaineeInheritsFrom (TClass *cl, TClass *base)
 Return true if 'cl' inherits from 'base'.
 
const TCollectionROOT::Internal::EmptyCollection ()
 Return an empty collection for use with nullptr TRangeCast.
 

Variables

R__EXTERN TVirtualMutexgCollectionMutex
 
const Bool_t kIterBackward = !kIterForward
 
const Bool_t kIterForward = kTRUE
 

Macro Definition Documentation

◆ R__COLL_COND_MUTEX

#define R__COLL_COND_MUTEX (   mutex)    this->IsUsingRWLock() ? mutex : nullptr

Definition at line 360 of file TCollection.h.

◆ R__COLLECTION_ITER_GUARD

#define R__COLLECTION_ITER_GUARD (   collection)

Definition at line 129 of file TCollection.h.

◆ R__COLLECTION_READ_GUARD

#define R__COLLECTION_READ_GUARD ( )

Definition at line 128 of file TCollection.h.

◆ R__COLLECTION_READ_LOCKGUARD

#define R__COLLECTION_READ_LOCKGUARD (   mutex)    ::ROOT::TReadLockGuard _R__UNIQUE_(R__readguard)(R__COLL_COND_MUTEX(mutex))

Definition at line 362 of file TCollection.h.

◆ R__COLLECTION_READ_LOCKGUARD_NAMED

#define R__COLLECTION_READ_LOCKGUARD_NAMED (   name,
  mutex 
)    ::ROOT::TReadLockGuard _NAME2_(R__readguard,name)(R__COLL_COND_MUTEX(mutex))

Definition at line 363 of file TCollection.h.

◆ R__COLLECTION_WRITE_GUARD

#define R__COLLECTION_WRITE_GUARD ( )

Definition at line 127 of file TCollection.h.

◆ R__COLLECTION_WRITE_LOCKGUARD

#define R__COLLECTION_WRITE_LOCKGUARD (   mutex)    ::ROOT::TWriteLockGuard _R__UNIQUE_(R__readguard)(R__COLL_COND_MUTEX(mutex))

Definition at line 365 of file TCollection.h.

◆ R__COLLECTION_WRITE_LOCKGUARD_NAMED

#define R__COLLECTION_WRITE_LOCKGUARD_NAMED (   name,
  mutex 
)    ::ROOT::TWriteLockGuard _NAME2_(R__readguard,name)(R__COLL_COND_MUTEX(mutex))

Definition at line 366 of file TCollection.h.

◆ R__FOR_EACH

#define R__FOR_EACH (   type,
  proc 
)
Value:
SetCurrentCollection(); \
type *_NAME3_(obj_,type,proc); \
while ((_NAME3_(obj_,type,proc) = (type*) _NAME3_(nxt_,type,proc)())) \
_NAME3_(obj_,type,proc)->proc
#define _NAME3_(name1, name2, name3)
Definition RConfig.hxx:444
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
static TCollection * GetCurrentCollection()
Return the globally accessible collection.

Definition at line 373 of file TCollection.h.

Typedef Documentation

◆ TRangeDynCast

template<typename T >
using TRangeDynCast = ROOT::Detail::TRangeCast<T, true>

TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.

The typical use is:

for(auto bcl : TRangeDynCast<TBaseClass>( *cl->GetListOfBases() )) {
if (!bcl) continue;
... use bcl as a TBaseClass*
}
for(auto bcl : TRangeDynCast<TBaseClass>( cl->GetListOfBases() )) {
if (!bcl) continue;
... use bcl as a TBaseClass*
}
#define a(i)
Definition RSha256.hxx:99
Each class (see TClass) has a linked list of its base class(es).
Definition TBaseClass.h:33
Template Parameters
TThe new type to convert to.

Definition at line 358 of file TCollection.h.

Variable Documentation

◆ gCollectionMutex

R__EXTERN TVirtualMutex* gCollectionMutex

Definition at line 45 of file TCollection.h.

◆ kIterBackward

const Bool_t kIterBackward = !kIterForward

Definition at line 43 of file TCollection.h.

◆ kIterForward

const Bool_t kIterForward = kTRUE

Definition at line 42 of file TCollection.h.