30#include "clang/Basic/SourceLocation.h"
31#include "clang/Basic/SourceManager.h"
32#include "clang/AST/DeclCXX.h"
33#include "clang/AST/ASTContext.h"
34#include "clang/AST/DeclTemplate.h"
43 clang::ASTContext& ctx = D->getASTContext();
44 clang::SourceManager&
SM = ctx.getSourceManager();
45 clang::SourceLocation
SL = D->getLocation();
50 SL =
SM.getExpansionLoc(
SL);
52 if (
SL.isValid() &&
SL.isFileID()) {
53 clang::PresumedLoc
PLoc =
SM.getPresumedLoc(
SL);
54 return PLoc.getFilename();
163 for (
int i = 0; i < level; ++i) {
174 out<<
tabs<<
"No attributes"<<std::endl;
186 const std::string&
name,
210 const clang::CXXRecordDecl *D = llvm::dyn_cast<clang::CXXRecordDecl>(
decl);
215 const clang::TypedefNameDecl*
typedefNameDecl = llvm::dyn_cast<clang::TypedefNameDecl> (
decl);
235 const clang::CXXRecordDecl *
target
270 if (!
name.compare(0, 24,
"ROOT::R__dummyintdefault")) {
273 if (!
name.compare(0, 27,
"ROOT::R__dummyVersionNumber")) {
276 if (!
name.compare(0, 22,
"ROOT::R__dummyStreamer")) {
279 if (
name.find(
"(anonymous namespace)") != std::string::npos) {
374 std::string temp = pattern;
379 if (pattern.size()==1 && pattern ==
"*"){
384 while (!temp.empty()){
385 pos = temp.find(
"*");
393 out.push_back(split);
399 temp = temp.substr(1);
401 else if (pos == (
int)(temp.length()-1)) {
402 if (pos > 0 && temp.at(pos-1) ==
'\') {
403 split += temp.substr(0, temp.length()-2);
404 split += temp.at(pos);
405 out.push_back(split);
409 temp = temp.substr(0, (temp.length()-1));
412 if (pos > 0 && temp.at(pos-1) ==
'\') {
413 split += temp.substr(0, pos-1);
414 split += temp.at(pos);
418 temp = temp.substr(pos);
423 split += temp.substr(0, pos);
426 split = temp.substr(0, pos);
429 temp = temp.substr(pos);
430 out.push_back(split);
446 bool begin = pattern.front() ==
'*';
447 if (pattern.size() == 1 && begin) {
453 bool end = pattern.back() ==
'*';
459 if (
pos_end == std::string::npos) {
465 int len = last.length();
475 if (
pos1 == std::string::npos || (!begin &&
pos1 != 0)) {
483 int len = (*it).length();
553 std::cout<<
"Error - A pattern selection without sub patterns." <<std::endl;
static bool R__match_filename(const char *srcname, const char *filename)
static const char * R__GetDeclSourceFileName(const clang::Decl *D)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
void SetAttributeValue(const std::string &attributeName, const std::string &attributeValue)
bool fHasFilePatternAttribute
bool GetAttributeValue(const std::string &attributeName, std::string &returnValue) const
bool CheckPattern(const std::string &test, const std::string &pattern, const std::list< std::string > &patterns_list, bool isLinkdef) const
bool fHasPatternAttribute
void SetSelected(ESelect sel)
void ProcessPattern(const std::string &pattern, std::list< std::string > &out) const
const clang::CXXRecordDecl * fCXXRecordDecl
bool fHasProtoNameAttribute
std::list< std::string > fSubPatterns
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)
bool GetMatchFound() const
const clang::Type * GetRequestedType() const
std::string fProtoPattern
const AttributesMap_t & GetAttributes() const
ESelect GetSelected() const
bool HasAttributeWithName(const std::string &attributeName) const
AttributesMap_t fAttributes
bool fHasProtoPatternAttribute
cling::Interpreter * fInterp
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
BaseSelectionRule(ESelect sel)
virtual void Print(std::ostream &out) const =0
bool fHasFromTypedefAttribute
const_iterator begin() const
const_iterator end() const
std::string InsertStd(const char *tname)
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.