128#include "RConfigure.h"
151#define IfDebug(x) if(gDebug==TTabCom::kDebug) x
177 fPrevInterpMarker(0),
436 while (
const auto key = next()) {
438 const char* className = key->GetName();
439 if (!strncmp(className,
"Library.", 8))
442 if (!strstr(className,
".h"))
459 const char* className =
gInterpreter->ClassInfo_FullName(ci);
460 if (strstr(className,
"(anonymous)"))
505 if (path &&
fpFiles && strcmp(path, previousPath) == 0) {
544 std::ifstream file1(outf);
546 Error(
"TTabCom::GetListOfEnvVars",
"could not open file \"%s\"",
558 line.ReadToDelim(file1,
'=');
559 file1.ignore(32000,
'\n');
583 return gROOT->GetListOfGlobalFunctions(
true);
640 passwd.open(
"/etc/passwd");
644 passwd.ignore(32000,
'\n');
679 Int_t & nGoodStrings)
688 Bool_t atLeast1GoodString;
692 atLeast1GoodString =
kFALSE;
696 if ((pObj = next())) {
700 atLeast1GoodString =
kTRUE;
719 if ((pObj = next())) {
727 while (((
int) strlen(
s) >= i &&
s[i] == ch0) ||
728 (atLeast1GoodString && !isGood));
746 assert(dirName != 0);
765 if (fileName ==
"." || fileName ==
"..")
807 assert(varName != 0);
808 IfDebug(std::cerr <<
"DetermineClass(\"" << varName <<
"\");" << std::endl);
812 if (!fout)
return "";
820 cmd =
"gROOT->ProcessLine(\"";
828 gROOT->ProcessLineSync(
".>");
834 std::ifstream file1(outf);
836 Error(
"TTabCom::DetermineClass",
"could not open file \"%s\"",
842 if (!file1 ||
c <= 0 ||
c !=
'(') {
843 Error(
"TTabCom::DetermineClass",
"variable \"%s\" not defined?",
847 IfDebug(std::cerr << (
char)
c << std::flush);
853 if (
type ==
"const" ||
type ==
"class") {
857 IfDebug(std::cerr << (
char)
c << std::flush);
861 type.ReadToDelim(file1,
')');
866 if (
type.EndsWith(
"const"))
887 const char *fignore =
gEnv->
GetValue(
"TabCom.FileIgnore", (
char *) 0);
893 std::istringstream endings((
char *) fignore);
895 std::istrstream endings((
char *) fignore);
901 while (!ending.
IsNull()) {
902 if (
s.EndsWith(ending))
964 if (!fout)
return "";
969 std::ifstream file1(outf);
971 Error(
"TTabCom::GetSysIncludePath",
"could not open file \"%s\"",
983 if (!token.IsNull()) {
986 path.
Append(token.Data() + 2);
998 TString sCINTSYSDIR(
"$ROOTSYS/cint");
1000 TString sCINTSYSDIR(CINTINCDIR);
1002 path.
Append(
":" + sCINTSYSDIR +
"/include");
1006 path.
Append(
":/usr/include");
1045 if (!path1[0]) path1 =
".";
1049 std::istringstream path((
char *) path1);
1051 std::istrstream path((
char *) path1);
1061 IfDebug(std::cerr <<
"NewListOfFilesInPath(): dirName = " << dirName <<
1083 char c1 = (fileName.
Length() > 0) ? fileName[0] : 0;
1116 const Int_t kNotDefined = -2;
1117 static Int_t old_level = kNotDefined;
1121 if (old_level == kNotDefined) {
1122 std::cerr <<
"NoMsg(): ERROR 1. old_level==" << old_level << std::endl;
1127 old_level = kNotDefined;
1130 if (old_level != kNotDefined) {
1131 std::cerr <<
"NoMsg(): ERROR 2. old_level==" << old_level << std::endl;
1158 const char appendage[],
1170 IfDebug(std::cerr <<
"TTabCom::Complete() ..." << std::endl);
1172 assert(pListOfCandidates != 0);
1175 const int loc = *
fpLoc;
1191 int start = s2.
Index(re);
1193 IfDebug(std::cerr <<
" s1: " <<
s1 << std::endl);
1194 IfDebug(std::cerr <<
" s2: " << s2 << std::endl);
1195 IfDebug(std::cerr <<
" s3: " << s3 << std::endl);
1196 IfDebug(std::cerr <<
"start: " << start << std::endl);
1197 IfDebug(std::cerr << std::endl);
1203 TList listOfMatches;
1204 TList listOfFullPaths;
1210 TIter next_candidate(pListOfCandidates);
1211 TIter next_match(&listOfMatches);
1212 TIter next_fullpath(&listOfFullPaths);
1215 while ((pObj = next_candidate())) {
1217 const char *s4 = pObj->
GetName();
1222 const char *s5 = strrchr(s4,
'/');
1234 IfDebug(std::cerr <<
"adding " << s5 <<
'\t' << s4 << std::endl);
1242 IfDebug(std::cerr <<
"adding " << s5 <<
'\t' << s4 << std::endl);
1258 if (nMatches == 0) {
1267 if (nMatches == 1) {
1269 const char *short_name = next_match()->GetName();
1270 const char *full_name = next_fullpath()->GetName();
1272 pObj = pListOfCandidates->
FindObject(short_name);
1274 IfDebug(std::cerr << std::endl <<
"class: " << pObj->
ClassName() << std::endl);
1277 else if (className ==
"TMethod" || className ==
"TFunction") {
1283 }
else if (className ==
"TDataMember") {
1288 CopyMatch(match, short_name, appendage, full_name);
1297 IfDebug(std::cerr <<
" i=" << i <<
" ch=" << ch << std::endl);
1305 if (nGoodStrings == 1) {
1309 s = next_match()->GetName();
1310 s0 = next_fullpath()->GetName();
1317 IfDebug(std::cerr <<
"more than 1 GoodString" << std::endl);
1328 IfDebug(std::cerr <<
"printing ambiguous matches" << std::endl);
1329 std::set<std::string> alreadyPrinted;
1330 while ((pObj = next_match())) {
1332 if (alreadyPrinted.insert(
s).second) {
1334 s0 = next_fullpath()->GetName();
1337 out <<
s <<
"/" << std::endl;
1339 out <<
s << std::endl;
1360 int i = strlen(
fBuf);
1361 int l = strlen(match) - (loc - start);
1365 Error(
"TTabCom::Complete",
"buffer overflow");
1370 IfDebug(std::cerr <<
" i=" << i << std::endl);
1371 IfDebug(std::cerr <<
" L=" <<
l << std::endl);
1372 IfDebug(std::cerr <<
"loc=" << loc << std::endl);
1375 for (; i >= loc; i -= 1) {
1408 const char appendage[],
1409 const char fullName[])
const
1421 assert(localName != 0);
1424 strcpy(
dest, localName);
1426 const char *key =
"filename";
1427 const int key_len = strlen(key);
1429 IfDebug(std::cerr <<
"CopyMatch()." << std::endl);
1430 IfDebug(std::cerr <<
"localName: " << (localName ? localName :
"0") <<
1432 IfDebug(std::cerr <<
"appendage: " << (appendage ? appendage :
"0") <<
1434 IfDebug(std::cerr <<
" fullName: " << (fullName ? fullName :
"0") <<
1439 if (appendage && strncmp(appendage, key, key_len) == 0) {
1441 appendage += key_len;
1442 IfDebug(std::cerr <<
"new appendage: " << appendage << std::endl);
1445 strcpy(
dest + strlen(localName),
"/");
1448 strcpy(
dest + strlen(localName), appendage);
1452 strcpy(
dest + strlen(localName), appendage);
1466 for (
int context = 0; context <
kNUM_PAT; ++context) {
1469 IfDebug(std::cerr << std::endl
1470 <<
"context=" << context <<
" "
1471 <<
"RegExp=" <<
fRegExp[context]
1484 const char defaultPath[])
const
1490 if (end>0 && path[end]!=
'/' && path[end]!=
'\\') {
1495 TString newBase, extendedPath;
1498 if (fileName[end] !=
'/' && fileName[end] !=
'\\') {
1503 extendedPath =
ExtendPath(defaultPath, newBase);
1506 extendedPath = defaultPath;
1508 IfDebug(std::cerr << std::endl);
1509 IfDebug(std::cerr <<
" fileName: " << fileName << std::endl);
1510 IfDebug(std::cerr <<
" pathBase: " << newBase << std::endl);
1512 IfDebug(std::cerr <<
" defaultPath: " << defaultPath << std::endl);
1514 IfDebug(std::cerr <<
" defaultPath: " << std::endl);
1516 IfDebug(std::cerr <<
"extendedPath: " << extendedPath << std::endl);
1517 IfDebug(std::cerr << std::endl);
1519 return extendedPath;
1531 std::stringstream str;
1537 if (originalPath) str << originalPath;
1574 const char dummy[] =
".";
1582 std::cerr << std::endl <<
"tab completion not implemented for this context" <<
1591 pos =
Complete(
"[^~]*$", pListOfUsers,
"/", out);
1598 pos =
Complete(
"[^$]*$", pEnv,
"", out);
1606 const TString fileName = s3(
"[^ ><]*$");
1612 pos =
Complete(
"[^ /]*$", pListOfFiles,
"filename ", out);
1621 const TString fileName = s3(
"[^ ]*$");
1628 pos =
Complete(
"[^ /]*$", pListOfFiles,
"filename ", out);
1639 TString fileName = s3(
"[^<]*$");
1657 const TString fileName = s3(
"[^\"]*$");
1663 pos =
Complete(
"[^\"/]*$", pListOfFiles,
"filename\" ", out);
1675 const TString fileName = s3(
"[^\"]*$");
1680 pos =
Complete(
"[^\"/]*$", pListOfFiles,
"filename\");", out);
1686 const TString fileName = s3(
"[^ \"]*$");
1690 pos =
Complete(
"[^\" /]*$", pListOfFiles,
"filename\"", out);
1702 IfDebug(std::cerr << std::endl);
1703 IfDebug(std::cerr <<
"name: " <<
'"' <<
name <<
'"' << std::endl);
1708 TString partname = s3(
"[_a-zA-Z][_a-zA-Z0-9]*$");
1719 TString sym = str(
"[_a-zA-Z][_a-zA-Z0-9]*::$");
1720 if (
sym.Length() == 0)
1723 prefix =
sym + prefix;
1729 TString sym = prefix(
"[_a-zA-Z][_a-zA-Z0-9]*::$");
1732 IfDebug(std::cerr <<
"prefix: " <<
'"' << prefix <<
'"' << std::endl);
1733 IfDebug(std::cerr <<
"preprefix: " <<
'"' << preprefix <<
'"' << std::endl);
1736 if (namesp.
Length() >= 2)
1738 IfDebug(std::cerr <<
"namesp: " <<
'"' << namesp <<
'"' << std::endl);
1750 for (i = 0; i < tmp->
GetSize(); i++) {
1774 pos =
Complete(
"[^: ]*$", pList,
"", out);
1778 if (context != original_context)
1798 IfDebug(std::cerr << std::endl);
1799 IfDebug(std::cerr <<
"name: " <<
'"' <<
name <<
'"' << std::endl);
1809 Fatal(
"TTabCom::Hook",
"Conext case %d not handled",context);
1825 int* store_fpLoc =
fpLoc;
1826 char* store_fBuf =
fBuf;
1827 pos =
Complete(
"[^. ]*$", pList,
"(", out);
1829 fpLoc = store_fpLoc;
1836 pos =
Complete(
"[^> ]*$", pList,
"(", out);
1839 Fatal(
"TTabCom::Hook",
"Conext case %d not handled",context);
1845 if (context != original_context)
1859 IfDebug(std::cerr << std::endl);
1860 IfDebug(std::cerr <<
"name: " <<
'"' <<
name <<
'"' << std::endl);
1865 TString partname = s3(
"[_a-zA-Z][_a-zA-Z0-9]* *($");
1876 TString sym = str(
"[_a-zA-Z][_a-zA-Z0-9]*::$");
1877 if (
sym.Length() == 0)
1880 prefix =
sym + prefix;
1886 TString sym = prefix(
"[_a-zA-Z][_a-zA-Z0-9]*::$");
1889 IfDebug(std::cerr <<
"prefix: " <<
'"' << prefix <<
'"' << std::endl);
1890 IfDebug(std::cerr <<
"preprefix: " <<
'"' << preprefix <<
'"' << std::endl);
1901 methodName = s3(
"[^:>\\.(]*($");
1905 IfDebug(std::cerr << methodName << std::endl);
1913 TIter nextMethod(pList);
1915 while ((pMethod = (
TMethod *) nextMethod())) {
1916 if (methodName == pMethod->
GetName()) {
1940 if (context != original_context)
1956 name = s3(
"[_a-zA-Z][_a-zA-Z0-9:]* *($", 3);
1961 name = s3(
"^[_a-zA-Z][_a-zA-Z0-9:]*");
1964 IfDebug(std::cerr << std::endl);
1965 IfDebug(std::cerr <<
"name: " <<
'"' <<
name <<
'"' << std::endl);
1987 Fatal(
"TTabCom::Hook",
"Conext case %d not handled",context);
1998 methodName =
name(
"[_a-zA-Z][_a-zA-Z0-9]*$");
2001 methodName = s3(
"[^:>\\.(]*($");
2005 IfDebug(std::cerr << methodName << std::endl);
2013 TIter nextMethod(pList);
2015 while ((pMethod = (
TMethod *) nextMethod())) {
2016 if (methodName == pMethod->
GetName()) {
2040 if (context != original_context)
2051 if (l2 > l3 && s2[l2 - l3 - 1] ==
'.') {
2052 std::cerr << std::endl <<
2053 "tab completion not implemented for this context" << std::endl;
2057 if (l2 > l3 + 1 && s2(l2 - l3 - 2, 2) ==
"->") {
2058 std::cerr << std::endl <<
2059 "tab completion not implemented for this context" << std::endl;
2066 if (pL2) pList->
AddAll(pL2);
2070 if (pC1) pList->
AddAll(pC1);
2073 if (pC3) pList->
AddAll(pC3);
2075 pos =
Complete(
"[_a-zA-Z][_a-zA-Z0-9]*$", pList,
"", out);
2084 TString functionName = s3(
"[_a-zA-Z][_a-zA-Z0-9]*");
2085 IfDebug(std::cerr << functionName << std::endl);
2090 while ((pObj = nextGlobalFunc())) {
2091 if (strcmp(pObj->
GetName(), functionName) == 0) {
2092 listOfMatchingGlobalFuncs.
Add(pObj);
2096 if (listOfMatchingGlobalFuncs.
IsEmpty()) {
2097 std::cerr << std::endl <<
"no such function: " <<
dblquote(functionName)
2100 TIter next(&listOfMatchingGlobalFuncs);
2102 while ((pFunction = (
TFunction *) next())) {
2104 <<
" " << pFunction->
GetName()
2120 Fatal(
"TTabCom::Hook",
"Conext case %d not handled",context);
2169 "[_a-zA-Z][_a-zA-Z0-9:]* +[_a-zA-Z][_a-zA-Z0-9]* *($");
2171 "[_a-zA-Z][_a-zA-Z0-9]* *:: *[_a-zA-Z0-9]* *($");
2173 "[_a-zA-Z][_a-zA-Z0-9()]* *\\. *[_a-zA-Z0-9]* *($");
2175 "[_a-zA-Z][_a-zA-Z0-9()]* *-> *[_a-zA-Z0-9]* *($");
2178 "[_a-zA-Z][_a-zA-Z0-9]* *:: *[_a-zA-Z0-9]*$");
2180 "[_a-zA-Z][_a-zA-Z0-9()]* *\\. *[_a-zA-Z0-9()]*$");
2183 "[_a-zA-Z][_a-zA-Z0-9()]* *-> *[_a-zA-Z0-9()]*$");
2206 Error(
"TTabCom::MakeClassFromClassName",
"Unknown class \"%s\"", className);
2216 Error(
"TTabCom::MakeClassFromClassName",
"class \"%s\" is not defined.", className);
2264 (
gROOT->FindObject(varName) != 0);
2270 if (0) printf(
"varName is [%s] with iteration [%i]\n", varName, iter);
2276 if (!varName_exists && cut != 0)
2284 parentName[cut] = 0;
2285 if (0) printf(
"Parent string is [%s]\n", parentName.
Data());
2291 for(
Int_t i = cut-1; i>=0; --i) {
2292 switch (parentName[i]) {
2296 parentName = parentName(i+1,cut-i-1);
2308 if (varName[cut] ==
'.') {
2309 memberName = varName+cut+1;
2310 if (0) printf(
"Member/method is [%s]\n", memberName.
Data());
2314 memberName = varName+cut+2;
2315 if (0) printf(
"Member/method is [%s]\n", memberName.
Data());
2320 if (0) printf(
"I got [%s] from MakeClassFromVarName()\n", pclass->
GetName());
2324 if (0) printf(
"Variable [%s] exists!\n", parentName.
Data());
2327 if (iter == 0)
return pclass;
2329 if (0) printf(
"Trying data member [%s] of class [%s] ...\n",
2336 if (memberName == dmptr->
GetName())
break;
2340 if (0) printf(
"It's a member!\n");
2353 char *parentesis_ptr = (
char*)strrchr(memberName.
Data(),
'(');
2354 if (parentesis_ptr) *parentesis_ptr = 0;
2357 if (0) printf(
"Trying method [%s] of class [%s] ...\n",
2364 while ((mptr = (
TMethod *) next())) {
2365 if (strcmp(memberName.
Data(),mptr->
GetName())==0)
break;
2371 if (0) printf(
"It's a method called [%s] with return type [%s]\n",
2372 memberName.
Data(), returnName.
Data());
2375 if (returnName[returnName.
Length()-1] ==
'*')
2377 returnName[returnName.
Length()-1] = 0;
2397 if (!varName_exists) {
2398 std::cerr << std::endl <<
"variable " <<
dblquote(varName) <<
" not defined."
2414 if (className.
IsNull() || className ==
"*") {
2418 std::cerr << std::endl <<
"problem determining class of " <<
dblquote(varName)
2428 className[className.
Length()-1] = 0;
2457 Fatal(
"TTabCom::MakeClassFromVarName",
"Conext case %d not handled",context);
2463 for (i = *
fpLoc;
fBuf[i] !=
'.'; i -= 1) {
2466 for (i = strlen(
fBuf); i >= loc; i -= 1) {
2470 fBuf[loc + 1] =
'>';
2474 std::cerr << std::endl <<
dblquote(varName) <<
2475 " is of pointer type. Use this operator: ->" << std::endl;
2484 if (className[className.
Length() - 1] ==
'*') {
2485 std::cerr << std::endl <<
"can't handle pointers to pointers." << std::endl;
2504 Fatal(
"TTabCom::MakeClassFromVarName",
"Conext case %d not handled",context);
2510 for (i = *
fpLoc;
fBuf[i - 1] !=
'-' &&
fBuf[i] !=
'>'; i -= 1) {
2513 int len = strlen(
fBuf);
2514 for (; i < len; i += 1) {
2520 std::cerr << std::endl <<
dblquote(varName) <<
2521 " is not of pointer type. Use this operator: ." << std::endl;
2538 std::cerr << std::endl
2540 << (
int) handle <<
" >= kNUM_PAT=" << (
int)
kNUM_PAT << std::endl;
2559 if (start > (
int)strlen(var_str)) start = strlen(var_str);
2561 for (
int i = start; i > 0; i--)
2563 if (var_str[i] ==
'.')
return i;
2564 if (var_str[i] ==
'>' && i > 0 && var_str[i-1] ==
'-')
return i-1;
int Makepat(const char *, Pattern_t *, int)
Make a pattern template from the string pointed to by exp.
const char * Matchs(const char *, size_t len, const Pattern_t *, const char **)
Match a string with a pattern.
static RooMathCoreReg dummy
void Error(const char *location, const char *msgfmt,...)
R__EXTERN Int_t gErrorIgnoreLevel
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TInterpreter * gCling
Bool_t R_ISDIR(Int_t mode)
R__EXTERN TSystem * gSystem
static char * Next()
Returns next class from sorted class table.
TClass instances represent classes, structs and namespaces in the ROOT type system.
const TList * GetListOfAllPublicMethods(Bool_t load=kTRUE)
Returns a list of all public methods of this class and its base classes.
TList * GetListOfAllPublicDataMembers(Bool_t load=kTRUE)
Returns a list of all public data members of this class and its base classes.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Collection abstract base class.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
virtual void Delete(Option_t *option="")=0
Delete this object.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Bool_t IsEmpty() const
Bool_t Contains(const char *name) const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Global functions class (global functions are obtained from CINT).
const char * GetSignature()
Return signature of function.
Int_t GetNargs() const
Number of function arguments.
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual int DisplayIncludePath(FILE *) const
virtual void Add(TObject *obj)
Each ROOT class (see TClass) has a linked list of methods.
virtual const char * GetCommentString()
Returns a comment string from the class declaration.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
static const char * GetMacroPath()
Get macro search path. Static utility function.
Regular expression class.
Sequenceable collection abstract base class.
virtual void Add(TObject *obj)
virtual TObject * At(Int_t idx) const =0
std::istream & ReadToDelim(std::istream &str, char delim='\n')
Read up to an EOF, or a delimiting character, whichever comes first.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
Beep for duration milliseconds with a tone of frequency freq.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
static void NoMsg(Int_t errorLevel)
[static utility function]/////////////////////////////
const TSeqCollection * GetListOfCppDirectives()
Return the list of CPP directives.
Int_t Hook(char *buf, int *pLoc, std::ostream &out)
[private]
ULong64_t fPrevInterpMarker
void ClearFiles()
Close all files.
static TString DetermineClass(const char varName[])
[static utility function]/////////////////////////////
static Bool_t ExcludedByFignore(TString s)
[static utility function]/////////////////////////////
void InitPatterns()
[private]
void RehashEnvVars()
Environemnt variables rehashing.
const TSeqCollection * GetListOfSysIncFiles()
Return the list of system include files.
void ClearAll()
clears all lists except for user names and system include files.
TSeqCollection * fpDirectives
const TSeqCollection * GetListOfFilesInPath(const char path[])
"path" should be initialized with a colon separated list of system directories
TSeqCollection * fpClasses
TSeqCollection * fpEnvVars
void ClearSysIncFiles()
Close system files.
const TSeqCollection * GetListOfEnvVars()
Uses "env" (Unix) or "set" (Windows) to get list of environment variables.
TString DeterminePath(const TString &fileName, const char defaultPath[]) const
[private]
void CopyMatch(char dest[], const char localName[], const char appendage[]=0, const char fullName[]=0) const
[private]
const TSeqCollection * GetListOfPragmas()
Return the list of pragmas.
static TSeqCollection * NewListOfFilesInPath(const char path[])
[static utility function]/////////////////////////////
TClass * MakeClassFromVarName(const char varName[], EContext_t &context, int iter=0)
[private] (does some specific error handling that makes the function unsuitable for general use....
const TSeqCollection * GetListOfGlobals()
Return the list of globals.
Pattern_t fPat[kNUM_PAT][MAX_LEN_PAT]
void SetPattern(EContext_t handle, const char regexp[])
[private]
TSeqCollection * fpSysIncFiles
void RehashGlobals()
Reload globals.
TClass * MakeClassFromClassName(const char className[]) const
[private] (does some specific error handling that makes the function unsuitable for general use....
void RehashGlobalFunctions()
Reload global functions.
void ClearGlobalFunctions()
Forget all global functions seen so far.
void ClearPragmas()
Forget all pragmas seen so far.
static Bool_t PathIsSpecifiedInFileName(const TString &fileName)
[static utility function]/////////////////////////////
TString ExtendPath(const char originalPath[], TString newBase) const
[private]
TTabCom()
Default constructor.
void RehashPragmas()
Reload pragmas.
const TSeqCollection * GetListOfClasses()
Return the list of classes.
void RehashCppDirectives()
Cpp rehashing.
void RehashUsers()
Reload users.
const TSeqCollection * GetListOfUsers()
reads from "/etc/passwd"
static void AppendListOfFilesInDirectory(const char dirName[], TSeqCollection *pList)
[static utility function]/////////////////////////////
void ClearClasses()
Clear classes and namespace collections.
TSeqCollection * fpPragmas
Int_t Complete(const TRegexp &re, const TSeqCollection *pListOfCandidates, const char appendage[], std::ostream &out, TString::ECaseCompare cmp=TString::kExact)
[private]
const char * fRegExp[kNUM_PAT]
int ParseReverse(const char *var_str, int start)
Returns the place in the string where to put the \0, starting the search from "start".
TCollection * GetListOfGlobalFunctions()
Return the list of global functions.
void RehashSysIncFiles()
Reload system include files.
static Bool_t IsDirectory(const char fileName[])
[static utility function]/////////////////////////////
EContext_t DetermineContext() const
[private]
static TString GetSysIncludePath()
[static utility function]/////////////////////////////
void ClearEnvVars()
Forget all environment variables seen so far.
void ClearCppDirectives()
Forget all Cpp directives seen so far.
void ClearGlobals()
Forget all global variables seen so far.
void ClearUsers()
Forget all user seen so far.
void RehashAll()
clears and then rebuilds all lists except for user names and system include files.
void RehashFiles()
Close files.
TClass * TryMakeClassFromClassName(const char className[]) const
Same as above but does not print the error message.
void RehashClasses()
Do the class rehash.
static Char_t AllAgreeOnChar(int i, const TSeqCollection *pList, Int_t &nGoodStrings)
[static utility function]///////////////////////////////////////////
static constexpr double s
#define dest(otri, vertexptr)
#define sym(otri1, otri2)