Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TDirectory::TContext Class Reference

Small helper to keep current directory context.

Automatically reverts to "old" directory

Definition at line 52 of file TDirectory.h.

Public Member Functions

 TContext ()
 
 TContext (TDirectory *newCurrent)
 
 TContext (TDirectory *previous, TDirectory *newCurrent)
 
 ~TContext ()
 Destructor.
 

Private Member Functions

 TContext (TContext &)=delete
 Pointer to the next TContext in the implied list of context pointing to fPrevious.
 
void CdNull ()
 Set the current directory to null.
 
TContextoperator= (TContext &)=delete
 

Private Attributes

std::atomic< boolfActiveDestructor {false}
 Pointer to the previous current directory.
 
std::atomic< TDirectory * > fDirectory {nullptr}
 
std::atomic< boolfDirectoryWait {false}
 Set to true during the destructor execution.
 
TContextfNext {nullptr}
 Pointer to the next TContext in the implied list of context pointing to fPrevious.
 
TContextfPrevious {nullptr}
 Set to true if a TDirectory might still access this object.
 

Friends

class TDirectory
 

#include <TDirectory.h>

Constructor & Destructor Documentation

◆ TContext() [1/4]

TDirectory::TContext::TContext ( TContext )
privatedelete

Pointer to the next TContext in the implied list of context pointing to fPrevious.

◆ TContext() [2/4]

TDirectory::TContext::TContext ( TDirectory previous,
TDirectory newCurrent 
)
inline

Definition at line 66 of file TDirectory.h.

◆ TContext() [3/4]

TDirectory::TContext::TContext ( )
inline

Definition at line 77 of file TDirectory.h.

◆ TContext() [4/4]

TDirectory::TContext::TContext ( TDirectory newCurrent)
inline

Definition at line 84 of file TDirectory.h.

◆ ~TContext()

TDirectory::TContext::~TContext ( )

Destructor.

Reset the current directory to its previous state.

Definition at line 135 of file TDirectory.cxx.

Member Function Documentation

◆ CdNull()

void TDirectory::TContext::CdNull ( )
private

Set the current directory to null.

This is called from the TContext destructor. Since the destructor is inline, we do not want to have it directly use a global variable.

Definition at line 125 of file TDirectory.cxx.

◆ operator=()

TContext & TDirectory::TContext::operator= ( TContext )
privatedelete

Friends And Related Symbol Documentation

◆ TDirectory

friend class TDirectory
friend

Definition at line 64 of file TDirectory.h.

Member Data Documentation

◆ fActiveDestructor

std::atomic<bool> TDirectory::TContext::fActiveDestructor {false}
private

Pointer to the previous current directory.

Definition at line 55 of file TDirectory.h.

◆ fDirectory

std::atomic<TDirectory*> TDirectory::TContext::fDirectory {nullptr}
private

Definition at line 54 of file TDirectory.h.

◆ fDirectoryWait

std::atomic<bool> TDirectory::TContext::fDirectoryWait {false}
private

Set to true during the destructor execution.

Definition at line 56 of file TDirectory.h.

◆ fNext

TContext* TDirectory::TContext::fNext {nullptr}
private

Pointer to the next TContext in the implied list of context pointing to fPrevious.

Definition at line 58 of file TDirectory.h.

◆ fPrevious

TContext* TDirectory::TContext::fPrevious {nullptr}
private

Set to true if a TDirectory might still access this object.

Definition at line 57 of file TDirectory.h.

  • core/base/inc/TDirectory.h
  • core/base/src/TDirectory.cxx