mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
804 B
30 lines
804 B
#include "Cursor.h" |
|
#include "Utility.h" |
|
|
|
const clang::CursorKind clang::Cursor::get_kind() { |
|
return (CursorKind) clang_getCursorKind(this->cx_cursor); |
|
} |
|
|
|
clang::SourceLocation clang::Cursor::get_source_location() const { |
|
return SourceLocation(clang_getCursorLocation(cx_cursor)); |
|
} |
|
|
|
clang::SourceRange clang::Cursor::get_source_range() const { |
|
return SourceRange(clang_getCursorExtent(cx_cursor)); |
|
} |
|
|
|
std::string clang::Cursor::get_usr() const { |
|
return clang::to_string(clang_getCursorUSR(cx_cursor)); |
|
} |
|
|
|
clang::Cursor clang::Cursor::get_referenced() const { |
|
return Cursor(clang_getCursorReferenced(cx_cursor)); |
|
} |
|
|
|
clang::Cursor::operator bool() const { |
|
return !clang_Cursor_isNull(cx_cursor); |
|
} |
|
|
|
bool clang::Cursor::operator==(const Cursor& rhs) const { |
|
return get_usr()==rhs.get_usr(); |
|
} |