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.

35 lines
921 B

11 years ago
#include "Cursor.h"
#include "Utility.h"
11 years ago
const clang::CursorKind clang::Cursor::get_kind() {
return (CursorKind) clang_getCursorKind(this->cx_cursor);
11 years ago
}
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_spelling() const {
return clang::to_string(clang_getCursorSpelling(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();
}