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;
const std::string & GetAttributeNArgsToKeep() const
bool HasAttributeName() const
std::list< std::string > fSubPatterns
std::list< std::string > fFileSubPatterns
const std::string & GetAttributeFileName() const
const clang::Type * fRequestedType
const std::string & GetAttributeFilePattern() const
virtual void Print(std::ostream &out) const =0
bool HasAttributeFilePattern() const
AttributesMap_t fAttributes
bool HasAttributeFromTypedef() const
bool HasAttributeProtoPattern() const
void SetIndex(long index)
static void DebugPrint(const char *fmt,...)
Print debugging message to stderr and, on Windows, to the system debugger.
bool IsFromTypedef() const
const std::string & GetAttributeProtoName() const
std::unordered_map< std::string, std::string > AttributesMap_t
bool HasAttributeFileName() const
bool HasInterpreter() const
Type
enumeration specifying the integration types.
const std::string & GetAttributePattern() const
const clang::CXXRecordDecl * GetCXXRecordDecl() const
bool HasAttributeProtoName() const
const std::string & GetAttributeName() const
void Print(std::ostream &os, const OptionType &opt)
cling::Interpreter * fInterp
bool HasAttributePattern() const
const char * GetSelFileName() const
Print a TSeq at the prompt:
std::ostream & operator<<(std::ostream &out, const BaseSelectionRule &obj)
BaseSelectionRule(ESelect sel)
const std::string & GetAttributeProtoPattern() const
const clang::CXXRecordDecl * fCXXRecordDecl
long GetLineNumber() const
void SetInterpreter(cling::Interpreter &interp)
BaseSelectionRule(long index, cling::Interpreter &interp, const char *selFileName="", long lineno=-1)