Functions | |
const std::string | Decls2FwdDecls (const std::vector< const clang::Decl * > &decls, bool(*ignoreFiles)(const clang::PresumedLoc &), const cling::Interpreter &interp, std::string *logs) |
int | EncloseInNamespaces (const clang::Decl &decl, std::string &defString) |
Take the namespaces which enclose the decl and put them around the definition string. | |
const clang::RecordDecl * | EncloseInScopes (const clang::Decl &decl, std::string &defString) |
Take the scopes which enclose the decl and put them around the definition string. | |
int | FwdDeclFromFcnDecl (const clang::FunctionDecl &fcnDecl, const cling::Interpreter &interpreter, std::string &defString) |
int | FwdDeclFromRcdDecl (const clang::RecordDecl &recordDecl, const cling::Interpreter &interpreter, std::string &defString, bool acceptStl=false) |
Convert a rcd decl to its fwd decl If this is a template specialisation, treat in the proper way. | |
int | FwdDeclFromTmplDecl (const clang::TemplateDecl &tmplDecl, const cling::Interpreter &interpreter, std::string &defString) |
Convert a tmplt decl to its fwd decl. | |
int | FwdDeclFromTypeDefNameDecl (const clang::TypedefNameDecl &tdnDecl, const cling::Interpreter &interpreter, std::string &fwdDeclString, std::unordered_set< std::string > *fwdDeclSet=nullptr) |
Extract "forward declaration" of a typedef. | |
int | FwdDeclIfTmplSpec (const clang::RecordDecl &recordDecl, const cling::Interpreter &interpreter, std::string &defString, const std::string &normalizedName) |
Convert a tmplt decl to its fwd decl. | |
int | GetDefArg (const clang::ParmVarDecl &par, std::string &valAsString, const clang::PrintingPolicy &pp) |
Get the default value as string. | |
int | PrepareArgsForFwdDecl (std::string &templateArgs, const clang::TemplateParameterList &tmplParamList, const cling::Interpreter &interpreter) |
Loop over the template parameters and build a string for template arguments using the fully qualified name There are different cases: Case 1: a simple template parameter E.g. | |
const std::string ROOT::TMetaUtils::AST2SourceTools::Decls2FwdDecls | ( | const std::vector< const clang::Decl * > & | decls, |
bool(*)(const clang::PresumedLoc &) | ignoreFiles, | ||
const cling::Interpreter & | interp, | ||
std::string * | logs | ||
) |
int ROOT::TMetaUtils::AST2SourceTools::EncloseInNamespaces | ( | const clang::Decl & | decl, |
std::string & | defString | ||
) |
Take the namespaces which enclose the decl and put them around the definition string.
For example, if the definition string is "myClass" which is enclosed by the namespaces ns1 and ns2, one would get: namespace ns2{ namespace ns1 { class myClass; } }
Definition at line 5220 of file TClingUtils.cxx.
const clang::RecordDecl * ROOT::TMetaUtils::AST2SourceTools::EncloseInScopes | ( | const clang::Decl & | decl, |
std::string & | defString | ||
) |
Take the scopes which enclose the decl and put them around the definition string.
If a class is encountered, bail out.
Definition at line 5232 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromFcnDecl | ( | const clang::FunctionDecl & | fcnDecl, |
const cling::Interpreter & | interpreter, | ||
std::string & | defString | ||
) |
int ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromRcdDecl | ( | const clang::RecordDecl & | recordDecl, |
const cling::Interpreter & | interpreter, | ||
std::string & | defString, | ||
bool | acceptStl = false |
||
) |
Convert a rcd decl to its fwd decl If this is a template specialisation, treat in the proper way.
If it is contained in a class, just fwd declare the class.
Definition at line 5464 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromTmplDecl | ( | const clang::TemplateDecl & | tmplDecl, |
const cling::Interpreter & | interpreter, | ||
std::string & | defString | ||
) |
Convert a tmplt decl to its fwd decl.
Definition at line 5333 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromTypeDefNameDecl | ( | const clang::TypedefNameDecl & | tdnDecl, |
const cling::Interpreter & | interpreter, | ||
std::string & | fwdDeclString, | ||
std::unordered_set< std::string > * | fwdDeclSetPtr = nullptr |
||
) |
Extract "forward declaration" of a typedef.
If the typedef is contained in a class, just fwd declare the class. If not, fwd declare the typedef and all the dependent typedefs and types if necessary.
Definition at line 5535 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::FwdDeclIfTmplSpec | ( | const clang::RecordDecl & | recordDecl, |
const cling::Interpreter & | interpreter, | ||
std::string & | defString, | ||
const std::string & | normalizedName | ||
) |
Convert a tmplt decl to its fwd decl.
Definition at line 5420 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::GetDefArg | ( | const clang::ParmVarDecl & | par, |
std::string & | valAsString, | ||
const clang::PrintingPolicy & | ppolicy | ||
) |
Get the default value as string.
Limited at the moment to:
Definition at line 5615 of file TClingUtils.cxx.
int ROOT::TMetaUtils::AST2SourceTools::PrepareArgsForFwdDecl | ( | std::string & | templateArgs, |
const clang::TemplateParameterList & | tmplParamList, | ||
const cling::Interpreter & | interpreter | ||
) |
Loop over the template parameters and build a string for template arguments using the fully qualified name There are different cases: Case 1: a simple template parameter E.g.
template<typename T> class A;
Case 2: a non-type: either an integer or an enum E.g. template<int I, Foo > class A;
where Foo
is enum Foo {red, blue};
2 sub cases here: SubCase 2.a: the parameter is an enum: bail out, cannot be treated. SubCase 2.b: use the fully qualified name Case 3: a TemplateTemplate argument E.g. template <template <typename> class T> class container { };
Definition at line 5271 of file TClingUtils.cxx.