Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Two more questions about using CDT AST

Good day!
I have two simple questions about using internal syntax analyser of CDT, similar to "Nayna Jain" <naynjain@xxxxxxxxxx>, but different.

1) How to find out in which header the interface/type/macros is defined/declared, having IASTName and IBinding for it? I khow, that IASTName.getContainingFilename() or IASTName.getFileLocation().getFileName() returns the absolute path of the header file. But how to determine, that the include directive, for example, is <bits/types.h>, but not only <types.h>???

2) Which API should I use to determine, that, for example, for class "basic_iostream" the full definition is "std::basic_iostream<char, std::char_traits<char> >", i.e. that it is template class, it has some parameters and it has namespace, etc?

2.a) And for method "seekpos", correspondingly, how to discover this crocodile:"__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)" ?
How to determine, which class this metod belongs to?

2.b) For metod "tolower" to discover, that it has const modificators? (std::ctype<char>::tolower(char*, char const*) const)

2.c) One more terrible example: I need to get "long std::__copy_streambufs<wchar_t, std::char_traits<wchar_t>
(std::basic_streambuf<wchar_t, std::char_traits<wchar_t> >*,
std::basic_streambuf<wchar_t, std::char_traits<wchar_t> >*)" from "__copy_streambufs" ... (((
How to get the list of the parameters and return value for this method?

Beforehand, great thanks for any help!

Best regards,
              Andrey.


Back to the top