12 #ifndef R__BASESELECTIONRULE_H 13 #define R__BASESELECTIONRULE_H 26 #include <unordered_map> 61 std::string fSelFileName=
"";
72 std::string fName =
"";
73 std::string fPattern =
"";
74 std::string fProtoName =
"";
75 std::string fProtoPattern =
"";
76 std::string fFileName =
"";
77 std::string fFilePattern =
"";
78 std::string fNArgsToKeep =
"";
79 bool fHasNameAttribute =
false;
80 bool fHasProtoNameAttribute =
false;
81 bool fHasPatternAttribute =
false;
82 bool fHasProtoPatternAttribute =
false;
83 bool fHasFileNameAttribute =
false;
84 bool fHasFilePatternAttribute =
false;
85 bool fHasFromTypedefAttribute =
false;
86 bool fIsFromTypedef =
false;
92 BaseSelectionRule(
long index, cling::Interpreter &interp,
const char* selFileName =
"",
long lineno=-1) : fIndex(index),fLineNumber(lineno),fSelFileName(selFileName),fIsSelected(
kNo),fMatchFound(false),fCXXRecordDecl(0),fRequestedType(0),fInterp(&interp) {}
94 BaseSelectionRule(
long index,
ESelect sel,
const std::string& attributeName,
const std::string& attributeValue, cling::Interpreter &interp,
const char* selFileName =
"",
long lineno=-1);
97 virtual void Print(std::ostream &out)
const = 0;
105 bool HasAttributeWithName(
const std::string& attributeName)
const;
109 bool GetAttributeValue(
const std::string& attributeName, std::string& returnValue)
const;
134 void SetAttributeValue(
const std::string& attributeName,
const std::string& attributeValue);
142 const AttributesMap_t& GetAttributes()
const;
143 void PrintAttributes(
int level)
const;
144 void PrintAttributes(std::ostream &out,
int level)
const;
146 EMatchType Match(
const clang::NamedDecl *decl,
const std::string&
name,
const std::string& prototype,
bool isLinkdef)
const;
148 void SetMatchFound(
bool match);
149 bool GetMatchFound()
const;
153 void SetCXXRecordDecl(
const clang::CXXRecordDecl *decl,
const clang::Type *typeptr);
159 inline bool CheckPattern(
const std::string&
test,
const std::string&
pattern,
const std::list<std::string>& patterns_list,
bool isLinkdef)
const;
161 inline void ProcessPattern(
const std::string& pattern, std::list<std::string>& out)
const;
bool HasAttributeFileName() const
const std::string & GetAttributeFileName() const
std::list< std::string > fSubPatterns
const std::string & GetAttributeNArgsToKeep() const
std::list< std::string > fFileSubPatterns
const clang::Type * fRequestedType
const std::string & GetAttributeFilePattern() const
bool HasAttributeFilePattern() const
bool HasAttributeProtoName() const
const char * GetSelFileName() const
const std::string & GetAttributePattern() const
bool HasAttributePattern() const
virtual void Print(std::ostream &out) const =0
bool HasAttributeFromTypedef() const
AttributesMap_t fAttributes
bool IsFromTypedef() const
void SetIndex(long index)
const std::string & GetAttributeProtoName() const
static void DebugPrint(const char *fmt,...)
Print debugging message to stderr and, on Windows, to the system debugger.
bool HasInterpreter() const
std::unordered_map< std::string, std::string > AttributesMap_t
long GetLineNumber() const
const std::string & GetAttributeName() const
Type
enumeration specifying the integration types.
void Print(std::ostream &os, const OptionType &opt)
cling::Interpreter * fInterp
Print a TSeq at the prompt:
std::ostream & operator<<(std::ostream &out, const BaseSelectionRule &obj)
const clang::CXXRecordDecl * GetCXXRecordDecl() const
BaseSelectionRule(ESelect sel)
bool HasAttributeProtoPattern() const
const clang::CXXRecordDecl * fCXXRecordDecl
bool HasAttributeName() const
const std::string & GetAttributeProtoPattern() const
void SetInterpreter(cling::Interpreter &interp)
BaseSelectionRule(long index, cling::Interpreter &interp, const char *selFileName="", long lineno=-1)