ROOT
6.06/09
Reference Guide
|
Functions | |
const std::string | Decls2FwdDecls (const std::vector< const clang::Decl * > &decls, bool(*ignoreFiles)(const clang::PresumedLoc &), const cling::Interpreter &interp) |
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. More... | |
int | EncloseInNamespaces (const clang::Decl &decl, std::string &defString) |
Take the namespaces which enclose the decl and put them around the definition string. More... | |
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. More... | |
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. More... | |
int | FwdDeclFromTmplDecl (const clang::TemplateDecl &tmplDecl, const cling::Interpreter &interpreter, std::string &defString) |
Convert a tmplt decl to its fwd decl. More... | |
int | GetDefArg (const clang::ParmVarDecl &par, std::string &valAsString, const clang::PrintingPolicy &pp) |
Get the default value as string. More... | |
int | FwdDeclFromFcnDecl (const clang::FunctionDecl &fcnDecl, const cling::Interpreter &interpreter, std::string &defString) |
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. More... | |
const std::string ROOT::TMetaUtils::AST2SourceTools::Decls2FwdDecls | ( | const std::vector< const clang::Decl * > & | decls, |
bool(*)(const clang::PresumedLoc &) | ignoreFiles, | ||
const cling::Interpreter & | interp | ||
) |
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 4986 of file TMetaUtils.cxx.
Referenced by FwdDeclFromTmplDecl().
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 4998 of file TMetaUtils.cxx.
Referenced by EncloseInNamespaces(), FwdDeclFromRcdDecl(), and FwdDeclFromTypeDefNameDecl().
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 5191 of file TMetaUtils.cxx.
Referenced by FwdDeclFromTypeDefNameDecl(), and TreatSingleTemplateArg().
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 5103 of file TMetaUtils.cxx.
Referenced by FwdDeclFromRcdDecl(), and PrepareArgsForFwdDecl().
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 5262 of file TMetaUtils.cxx.
Referenced by TreatSingleTemplateArg().
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 5342 of file TMetaUtils.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 5037 of file TMetaUtils.cxx.
Referenced by FwdDeclFromTmplDecl().