12#ifndef R__BASESELECTIONRULE_H
13#define R__BASESELECTIONRULE_H
26#include <unordered_map>
90 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) {}
92 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;
109 bool GetAttributeValue(
const std::string& attributeName, std::string& returnValue)
const;
134 void SetAttributeValue(
const std::string& attributeName,
const std::string& attributeValue);
146 EMatchType Match(
const clang::NamedDecl *decl,
const std::string&
name,
const std::string& prototype,
bool isLinkdef)
const;
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;
std::ostream & operator<<(std::ostream &out, const BaseSelectionRule &obj)
void SetAttributeValue(const std::string &attributeName, const std::string &attributeValue)
bool fHasFilePatternAttribute
bool HasAttributeFileName() const
BaseSelectionRule(long index, cling::Interpreter &interp, const char *selFileName="", long lineno=-1)
bool HasAttributePattern() const
const std::string & GetAttributePattern() const
bool HasAttributeFilePattern() const
bool GetAttributeValue(const std::string &attributeName, std::string &returnValue) const
virtual ~BaseSelectionRule()=default
bool CheckPattern(const std::string &test, const std::string &pattern, const std::list< std::string > &patterns_list, bool isLinkdef) const
bool fHasPatternAttribute
bool HasInterpreter() const
void SetSelected(ESelect sel)
void ProcessPattern(const std::string &pattern, std::list< std::string > &out) const
const std::string & GetAttributeFileName() const
const clang::CXXRecordDecl * fCXXRecordDecl
const std::string & GetAttributeNArgsToKeep() const
bool fHasProtoNameAttribute
std::list< std::string > fSubPatterns
bool HasAttributeProtoPattern() const
const clang::CXXRecordDecl * GetCXXRecordDecl() const
virtual void DebugPrint() const
EMatchType Match(const clang::NamedDecl *decl, const std::string &name, const std::string &prototype, bool isLinkdef) const
void SetCXXRecordDecl(const clang::CXXRecordDecl *decl, const clang::Type *typeptr)
void SetIndex(long index)
void SetInterpreter(cling::Interpreter &interp)
const std::string & GetAttributeName() const
bool GetMatchFound() const
const clang::Type * GetRequestedType() const
long GetLineNumber() const
std::string fProtoPattern
const AttributesMap_t & GetAttributes() const
const std::string & GetAttributeProtoName() const
const std::string & GetAttributeProtoPattern() const
ESelect GetSelected() const
bool HasAttributeWithName(const std::string &attributeName) const
bool HasAttributeName() const
AttributesMap_t fAttributes
bool fHasProtoPatternAttribute
bool HasAttributeFromTypedef() const
cling::Interpreter * fInterp
bool IsFromTypedef() const
const clang::Type * fRequestedType
bool fHasFileNameAttribute
void SetMatchFound(bool match)
std::unordered_map< std::string, std::string > AttributesMap_t
void PrintAttributes(int level) const
std::list< std::string > fFileSubPatterns
bool HasAttributeProtoName() const
BaseSelectionRule(ESelect sel)
const char * GetSelFileName() const
virtual void Print(std::ostream &out) const =0
const std::string & GetAttributeFilePattern() const
bool fHasFromTypedefAttribute
Type
enumeration specifying the integration types.