Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTabCom Class Reference

Definition at line 52 of file TTabCom.h.

Public Types

enum  { kDebug = 17 }
 
enum  EContext_t {
  kUNKNOWN_CONTEXT =-1 , kSYS_UserName , kSYS_EnvVar , kCINT_stdout ,
  kCINT_stderr , kCINT_stdin , kCINT_Edit , kCINT_Load ,
  kCINT_Exec , kCINT_EXec , kCINT_pragma , kCINT_includeSYS ,
  kCINT_includePWD , kCINT_cpp , kROOT_Load , kSYS_FileName ,
  kCXX_NewProto , kCXX_ConstructorProto , kCXX_ScopeProto , kCXX_DirectProto ,
  kCXX_IndirectProto , kCXX_ScopeMember , kCXX_DirectMember , kCXX_IndirectMember ,
  kCXX_Global , kCXX_GlobalProto , kNUM_PAT
}
 
typedef TList TContainer
 
typedef TListIter TContIter
 

Public Member Functions

 TTabCom ()
 Default constructor.
 
virtual ~TTabCom ()
 
void ClearAll ()
 clears all lists except for user names and system include files.
 
void ClearClasses ()
 Clear classes and namespace collections.
 
void ClearCppDirectives ()
 Forget all Cpp directives seen so far.
 
void ClearEnvVars ()
 Forget all environment variables seen so far.
 
void ClearFiles ()
 Close all files.
 
void ClearGlobalFunctions ()
 Forget all global functions seen so far.
 
void ClearGlobals ()
 Forget all global variables seen so far.
 
void ClearPragmas ()
 Forget all pragmas seen so far.
 
void ClearSysIncFiles ()
 Close system files.
 
void ClearUsers ()
 Forget all user seen so far.
 
const TSeqCollectionGetListOfClasses ()
 Return the list of classes.
 
const TSeqCollectionGetListOfCppDirectives ()
 Return the list of CPP directives.
 
const TSeqCollectionGetListOfEnvVars ()
 Uses "env" (Unix) or "set" (Windows) to get list of environment variables.
 
const TSeqCollectionGetListOfFilesInPath (const char path[])
 "path" should be initialized with a colon separated list of system directories
 
TCollectionGetListOfGlobalFunctions ()
 Return the list of global functions.
 
const TSeqCollectionGetListOfGlobals ()
 Return the list of globals.
 
const TSeqCollectionGetListOfPragmas ()
 Return the list of pragmas.
 
const TSeqCollectionGetListOfSysIncFiles ()
 Return the list of system include files.
 
const TSeqCollectionGetListOfUsers ()
 reads from "/etc/passwd"
 
Int_t Hook (char *buf, int *pLoc, std::ostream &out)
 [private]
 
virtual TClassIsA () const
 
void RehashAll ()
 clears and then rebuilds all lists except for user names and system include files.
 
void RehashClasses ()
 Do the class rehash.
 
void RehashCppDirectives ()
 Cpp rehashing.
 
void RehashEnvVars ()
 Environemnt variables rehashing.
 
void RehashFiles ()
 Close files.
 
void RehashGlobalFunctions ()
 Reload global functions.
 
void RehashGlobals ()
 Reload globals.
 
void RehashPragmas ()
 Reload pragmas.
 
void RehashSysIncFiles ()
 Reload system include files.
 
void RehashUsers ()
 Reload users.
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static Char_t AllAgreeOnChar (int i, const TSeqCollection *pList, Int_t &nGoodStrings)
 [static utility function]///////////////////////////////////////////
 
static void AppendListOfFilesInDirectory (const char dirName[], TSeqCollection *pList)
 [static utility function]/////////////////////////////
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TString DetermineClass (const char varName[])
 [static utility function]/////////////////////////////
 
static Bool_t ExcludedByFignore (TString s)
 [static utility function]/////////////////////////////
 
static TString GetSysIncludePath ()
 [static utility function]/////////////////////////////
 
static Bool_t IsDirectory (const char fileName[])
 [static utility function]/////////////////////////////
 
static TSeqCollectionNewListOfFilesInPath (const char path[])
 [static utility function]/////////////////////////////
 
static void NoMsg (Int_t errorLevel)
 [static utility function]/////////////////////////////
 
static Bool_t PathIsSpecifiedInFileName (const TString &fileName)
 [static utility function]/////////////////////////////
 

Private Member Functions

 TTabCom (const TTabCom &)=delete
 
Int_t Complete (const TRegexp &re, const TSeqCollection *pListOfCandidates, const char appendage[], std::ostream &out, TString::ECaseCompare cmp=TString::kExact)
 [private]
 
void CopyMatch (char *dest, int dest_len, const char *localName, const char *appendage=nullptr, const char *fullName=nullptr) const
 [private]
 
EContext_t DetermineContext () const
 [private]
 
TString DeterminePath (const TString &fileName, const char defaultPath[]) const
 [private]
 
TString ExtendPath (const char originalPath[], TString newBase) const
 [private]
 
void InitPatterns ()
 [private]
 
TClassMakeClassFromClassName (const char className[]) const
 [private] (does some specific error handling that makes the function unsuitable for general use.) returns a new'd TClass given the name of a class.
 
TClassMakeClassFromVarName (const char varName[], EContext_t &context, int iter=0)
 [private] (does some specific error handling that makes the function unsuitable for general use.) returns a new'd TClass given the name of a variable.
 
TTabComoperator= (const TTabCom &)=delete
 
int ParseReverse (const char *var_str, int start)
 Returns the place in the string where to put the \0, starting the search from "start".
 
void SetPattern (EContext_t handle, const char regexp[])
 [private]
 
TClassTryMakeClassFromClassName (const char className[]) const
 Same as above but does not print the error message.
 

Private Attributes

char * fBuf
 
Int_t fLastIter
 
Pattern_t fPat [kNUM_PAT][1024]
 
TSeqCollectionfpClasses
 
TSeqCollectionfpDirectives
 
TSeqCollectionfpEnvVars
 
TSeqCollectionfpFiles
 
TSeqCollectionfpGlobals
 
intfpLoc
 
TSeqCollectionfpPragmas
 
ULong64_t fPrevInterpMarker
 
TSeqCollectionfpSysIncFiles
 
TSeqCollectionfpUsers
 
const char * fRegExp [kNUM_PAT]
 
Bool_t fVarIsPointer
 

#include <TTabCom.h>

Member Typedef Documentation

◆ TContainer

Definition at line 59 of file TTabCom.h.

◆ TContIter

Definition at line 60 of file TTabCom.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kDebug 

Definition at line 111 of file TTabCom.h.

◆ EContext_t

Enumerator
kUNKNOWN_CONTEXT 
kSYS_UserName 
kSYS_EnvVar 
kCINT_stdout 
kCINT_stderr 
kCINT_stdin 
kCINT_Edit 
kCINT_Load 
kCINT_Exec 
kCINT_EXec 
kCINT_pragma 
kCINT_includeSYS 
kCINT_includePWD 
kCINT_cpp 
kROOT_Load 
kSYS_FileName 
kCXX_NewProto 
kCXX_ConstructorProto 
kCXX_ScopeProto 
kCXX_DirectProto 
kCXX_IndirectProto 
kCXX_ScopeMember 
kCXX_DirectMember 
kCXX_IndirectMember 
kCXX_Global 
kCXX_GlobalProto 
kNUM_PAT 

Definition at line 113 of file TTabCom.h.

Constructor & Destructor Documentation

◆ TTabCom() [1/2]

TTabCom::TTabCom ( )

Default constructor.

Definition at line 177 of file TTabCom.cxx.

◆ ~TTabCom()

TTabCom::~TTabCom ( )
virtual

Definition at line 200 of file TTabCom.cxx.

◆ TTabCom() [2/2]

TTabCom::TTabCom ( const TTabCom )
privatedelete

Member Function Documentation

◆ AllAgreeOnChar()

Char_t TTabCom::AllAgreeOnChar ( int  i,
const TSeqCollection pList,
Int_t nGoodStrings 
)
static

[static utility function]///////////////////////////////////////////

if all the strings in "*pList" have the same ith character, that character is returned. otherwise 0 is returned.

any string "s" for which "ExcludedByFignore(s)" is true will be ignored unless All the strings in "*pList" are "ExcludedByFignore()"

in addition, the number of strings which were not "ExcludedByFignore()" is returned in "nGoodStrings".

Definition at line 685 of file TTabCom.cxx.

◆ AppendListOfFilesInDirectory()

void TTabCom::AppendListOfFilesInDirectory ( const char  dirName[],
TSeqCollection pList 
)
static

[static utility function]/////////////////////////////

adds a TObjString to "*pList" for each entry found in the system directory "dirName"

directories that do not exist are silently ignored.

Definition at line 750 of file TTabCom.cxx.

◆ Class()

static TClass * TTabCom::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TTabCom::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TTabCom::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 226 of file TTabCom.h.

◆ ClearAll()

void TTabCom::ClearAll ( )

clears all lists except for user names and system include files.

Definition at line 319 of file TTabCom.cxx.

◆ ClearClasses()

void TTabCom::ClearClasses ( )

Clear classes and namespace collections.

Definition at line 218 of file TTabCom.cxx.

◆ ClearCppDirectives()

void TTabCom::ClearCppDirectives ( )

Forget all Cpp directives seen so far.

Definition at line 230 of file TTabCom.cxx.

◆ ClearEnvVars()

void TTabCom::ClearEnvVars ( )

Forget all environment variables seen so far.

Definition at line 242 of file TTabCom.cxx.

◆ ClearFiles()

void TTabCom::ClearFiles ( )

Close all files.

Definition at line 254 of file TTabCom.cxx.

◆ ClearGlobalFunctions()

void TTabCom::ClearGlobalFunctions ( )

Forget all global functions seen so far.

Not needed anymore. Use gROOT->GetListOfGlobalFunctions()

Definition at line 267 of file TTabCom.cxx.

◆ ClearGlobals()

void TTabCom::ClearGlobals ( )

Forget all global variables seen so far.

With teh new implamentation the list is gROOT->GetListOfGlobals(true).

Definition at line 275 of file TTabCom.cxx.

◆ ClearPragmas()

void TTabCom::ClearPragmas ( )

Forget all pragmas seen so far.

Definition at line 282 of file TTabCom.cxx.

◆ ClearSysIncFiles()

void TTabCom::ClearSysIncFiles ( )

Close system files.

Definition at line 294 of file TTabCom.cxx.

◆ ClearUsers()

void TTabCom::ClearUsers ( )

Forget all user seen so far.

Definition at line 306 of file TTabCom.cxx.

◆ Complete()

Int_t TTabCom::Complete ( const TRegexp re,
const TSeqCollection pListOfCandidates,
const char  appendage[],
std::ostream &  out,
TString::ECaseCompare  cmp = TString::kExact 
)
private

[private]

Definition at line 1163 of file TTabCom.cxx.

◆ CopyMatch()

void TTabCom::CopyMatch ( char *  dest,
int  dest_len,
const char *  localName,
const char *  appendage = nullptr,
const char *  fullName = nullptr 
) const
private

[private]

Definition at line 1414 of file TTabCom.cxx.

◆ DeclFileName()

static const char * TTabCom::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 226 of file TTabCom.h.

◆ DetermineClass()

TString TTabCom::DetermineClass ( const char  varName[])
static

[static utility function]/////////////////////////////

returns empty string on failure. otherwise returns something like this: "TROOT*". fails for non-class types (ie, int, char, etc). fails for pointers to functions.

Definition at line 799 of file TTabCom.cxx.

◆ DetermineContext()

TTabCom::EContext_t TTabCom::DetermineContext ( ) const
private

[private]

Definition at line 1467 of file TTabCom.cxx.

◆ DeterminePath()

TString TTabCom::DeterminePath ( const TString fileName,
const char  defaultPath[] 
) const
private

[private]

Definition at line 1491 of file TTabCom.cxx.

◆ ExcludedByFignore()

Bool_t TTabCom::ExcludedByFignore ( TString  s)
static

[static utility function]/////////////////////////////

returns true iff "s" ends with one of the strings listed in the "TabCom.FileIgnore" resource.

Definition at line 892 of file TTabCom.cxx.

◆ ExtendPath()

TString TTabCom::ExtendPath ( const char  originalPath[],
TString  newBase 
) const
private

[private]

Definition at line 1534 of file TTabCom.cxx.

◆ GetListOfClasses()

const TSeqCollection * TTabCom::GetListOfClasses ( )

Return the list of classes.

Definition at line 431 of file TTabCom.cxx.

◆ GetListOfCppDirectives()

const TSeqCollection * TTabCom::GetListOfCppDirectives ( )

Return the list of CPP directives.

Definition at line 482 of file TTabCom.cxx.

◆ GetListOfEnvVars()

const TSeqCollection * TTabCom::GetListOfEnvVars ( )

Uses "env" (Unix) or "set" (Windows) to get list of environment variables.

Definition at line 527 of file TTabCom.cxx.

◆ GetListOfFilesInPath()

const TSeqCollection * TTabCom::GetListOfFilesInPath ( const char  path[])

"path" should be initialized with a colon separated list of system directories

Definition at line 508 of file TTabCom.cxx.

◆ GetListOfGlobalFunctions()

TCollection * TTabCom::GetListOfGlobalFunctions ( )

Return the list of global functions.

Definition at line 588 of file TTabCom.cxx.

◆ GetListOfGlobals()

const TSeqCollection * TTabCom::GetListOfGlobals ( )

Return the list of globals.

Definition at line 580 of file TTabCom.cxx.

◆ GetListOfPragmas()

const TSeqCollection * TTabCom::GetListOfPragmas ( )

Return the list of pragmas.

Definition at line 596 of file TTabCom.cxx.

◆ GetListOfSysIncFiles()

const TSeqCollection * TTabCom::GetListOfSysIncFiles ( )

Return the list of system include files.

Definition at line 627 of file TTabCom.cxx.

◆ GetListOfUsers()

const TSeqCollection * TTabCom::GetListOfUsers ( )

reads from "/etc/passwd"

Definition at line 639 of file TTabCom.cxx.

◆ GetSysIncludePath()

TString TTabCom::GetSysIncludePath ( )
static

[static utility function]/////////////////////////////

returns a colon-separated string of directories that CINT will search when you call #include<...>

returns empty string on failure.

Definition at line 928 of file TTabCom.cxx.

◆ Hook()

Int_t TTabCom::Hook ( char *  buf,
int pLoc,
std::ostream &  out 
)

[private]

Definition at line 1566 of file TTabCom.cxx.

◆ InitPatterns()

void TTabCom::InitPatterns ( )
private

[private]

Definition at line 2138 of file TTabCom.cxx.

◆ IsA()

virtual TClass * TTabCom::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Definition at line 226 of file TTabCom.h.

◆ IsDirectory()

Bool_t TTabCom::IsDirectory ( const char  fileName[])
static

[static utility function]/////////////////////////////

calls TSystem::GetPathInfo() to see if "fileName" is a system directory.

Definition at line 1029 of file TTabCom.cxx.

◆ MakeClassFromClassName()

TClass * TTabCom::MakeClassFromClassName ( const char  className[]) const
private

[private] (does some specific error handling that makes the function unsuitable for general use.) returns a new'd TClass given the name of a class.

user must delete. returns 0 in case of error.

Definition at line 2205 of file TTabCom.cxx.

◆ MakeClassFromVarName()

TClass * TTabCom::MakeClassFromVarName ( const char  varName[],
EContext_t context,
int  iter = 0 
)
private

[private] (does some specific error handling that makes the function unsuitable for general use.) returns a new'd TClass given the name of a variable.

user must delete. returns 0 in case of error. if user has operator.() or operator->() backwards, will modify: context, *fpLoc and fBuf. context sensitive behavior.

Definition at line 2254 of file TTabCom.cxx.

◆ NewListOfFilesInPath()

TSeqCollection * TTabCom::NewListOfFilesInPath ( const char  path1[])
static

[static utility function]/////////////////////////////

creates a list containing the full path name for each file in the (colon separated) string "path1"

memory is allocated with "new", so whoever calls this function takes responsibility for deleting it.

Definition at line 1049 of file TTabCom.cxx.

◆ NoMsg()

void TTabCom::NoMsg ( Int_t  errorLevel)
static

[static utility function]/////////////////////////////

calling "NoMsg( errorLevel )", sets "gErrorIgnoreLevel" to "errorLevel+1" so that all errors with "level < errorLevel" will be ignored.

calling the function with a negative argument (e.g., "NoMsg( -1 )") resets gErrorIgnoreLevel to its previous value.

Definition at line 1108 of file TTabCom.cxx.

◆ operator=()

TTabCom & TTabCom::operator= ( const TTabCom )
privatedelete

◆ ParseReverse()

int TTabCom::ParseReverse ( const char *  var_str,
int  start 
)
private

Returns the place in the string where to put the \0, starting the search from "start".

Definition at line 2564 of file TTabCom.cxx.

◆ PathIsSpecifiedInFileName()

Bool_t TTabCom::PathIsSpecifiedInFileName ( const TString fileName)
static

[static utility function]/////////////////////////////

true if "fileName"

  1. is an absolute path ("/tmp/a")
  2. is a relative path ("../whatever", "./test")
  3. starts with user name ("~/mail")
  4. starts with an environment variable ("$ROOTSYS/bin")

Definition at line 1088 of file TTabCom.cxx.

◆ RehashAll()

void TTabCom::RehashAll ( )

clears and then rebuilds all lists except for user names and system include files.

Definition at line 415 of file TTabCom.cxx.

◆ RehashClasses()

void TTabCom::RehashClasses ( )

Do the class rehash.

Definition at line 335 of file TTabCom.cxx.

◆ RehashCppDirectives()

void TTabCom::RehashCppDirectives ( )

Cpp rehashing.

Definition at line 344 of file TTabCom.cxx.

◆ RehashEnvVars()

void TTabCom::RehashEnvVars ( )

Environemnt variables rehashing.

Definition at line 353 of file TTabCom.cxx.

◆ RehashFiles()

void TTabCom::RehashFiles ( )

Close files.

Definition at line 362 of file TTabCom.cxx.

◆ RehashGlobalFunctions()

void TTabCom::RehashGlobalFunctions ( )

Reload global functions.

Definition at line 370 of file TTabCom.cxx.

◆ RehashGlobals()

void TTabCom::RehashGlobals ( )

Reload globals.

Definition at line 378 of file TTabCom.cxx.

◆ RehashPragmas()

void TTabCom::RehashPragmas ( )

Reload pragmas.

Definition at line 387 of file TTabCom.cxx.

◆ RehashSysIncFiles()

void TTabCom::RehashSysIncFiles ( )

Reload system include files.

Definition at line 396 of file TTabCom.cxx.

◆ RehashUsers()

void TTabCom::RehashUsers ( )

Reload users.

Definition at line 405 of file TTabCom.cxx.

◆ SetPattern()

void TTabCom::SetPattern ( EContext_t  handle,
const char  regexp[] 
)
private

[private]

Definition at line 2542 of file TTabCom.cxx.

◆ Streamer()

virtual void TTabCom::Streamer ( TBuffer )
virtual

◆ StreamerNVirtual()

void TTabCom::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 226 of file TTabCom.h.

◆ TryMakeClassFromClassName()

TClass * TTabCom::TryMakeClassFromClassName ( const char  className[]) const
private

Same as above but does not print the error message.

Definition at line 2234 of file TTabCom.cxx.

Member Data Documentation

◆ fBuf

char* TTabCom::fBuf
private

Definition at line 218 of file TTabCom.h.

◆ fLastIter

Int_t TTabCom::fLastIter
private

Definition at line 224 of file TTabCom.h.

◆ fPat

Pattern_t TTabCom::fPat[kNUM_PAT][ 1024]
private

Definition at line 221 of file TTabCom.h.

◆ fpClasses

TSeqCollection* TTabCom::fpClasses
private

Definition at line 208 of file TTabCom.h.

◆ fpDirectives

TSeqCollection* TTabCom::fpDirectives
private

Definition at line 210 of file TTabCom.h.

◆ fpEnvVars

TSeqCollection* TTabCom::fpEnvVars
private

Definition at line 211 of file TTabCom.h.

◆ fpFiles

TSeqCollection* TTabCom::fpFiles
private

Definition at line 212 of file TTabCom.h.

◆ fpGlobals

TSeqCollection* TTabCom::fpGlobals
private

Definition at line 213 of file TTabCom.h.

◆ fpLoc

int* TTabCom::fpLoc
private

Definition at line 219 of file TTabCom.h.

◆ fpPragmas

TSeqCollection* TTabCom::fpPragmas
private

Definition at line 214 of file TTabCom.h.

◆ fPrevInterpMarker

ULong64_t TTabCom::fPrevInterpMarker
private

Definition at line 209 of file TTabCom.h.

◆ fpSysIncFiles

TSeqCollection* TTabCom::fpSysIncFiles
private

Definition at line 215 of file TTabCom.h.

◆ fpUsers

TSeqCollection* TTabCom::fpUsers
private

Definition at line 216 of file TTabCom.h.

◆ fRegExp

const char* TTabCom::fRegExp[kNUM_PAT]
private

Definition at line 222 of file TTabCom.h.

◆ fVarIsPointer

Bool_t TTabCom::fVarIsPointer
private

Definition at line 223 of file TTabCom.h.

Libraries for TTabCom:

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