12 #ifndef R__LINKDEFREADER_H
13 #define R__LINKDEFREADER_H
27 #include "llvm/ADT/StringRef.h"
29 #include "TClingUtils.h"
36 class PragmaCreateCollector;
37 class PragmaLinkCollector;
38 class LinkdefReaderPragmaHandler;
39 class PragmaExtraInclude;
44 LinkdefReader(cling::Interpreter &interp,
45 ROOT::TMetaUtils::RConstructorTypes &IOConstructorTypes);
47 bool LoadIncludes(std::string &extraInclude);
48 bool Parse(SelectionRules &sr, llvm::StringRef code,
const std::vector<std::string> &parserArgs,
const char *llvmdir);
53 friend class PragmaCreateCollector;
54 friend class PragmaLinkCollector;
55 friend class LinkdefReaderPragmaHandler;
56 friend class PragmaExtraInclude;
60 SelectionRules *fSelectionRules;
61 std::string fIncludes;
62 ROOT::TMetaUtils::RConstructorTypes *fIOConstructorTypesPtr;
63 cling::Interpreter &fInterp;
93 static std::map<std::string, EPragmaNames> fgMapPragmaNames;
94 static std::map<std::string, ECppNames> fgMapCppNames;
96 static void PopulatePragmaMap();
97 static void PopulateCppMap();
101 bool AddInclude(
const std::string& include);
102 bool AddRule(
const std::string& ruletype,
103 const std::string& identifier,
105 bool requestOnlyTClass,
106 Options *option = 0);
108 bool ProcessFunctionPrototype(std::string &proto,
bool &name);
109 bool ProcessOperators(std::string &pattern);
111 bool IsPatternRule(
const std::string &rule_token);