# libclangmm - An easy to use C++-wrapper for libclang #
## About ##
This project is written by *cppit* as part of an bachelor thesis
This is a highlevel wrapper for [libclang](http://www.llvm.org). It
provides highlevel C++11 access to complicated C code.
# Install #
This section describes how to install this library on your system. The section below is tested in on unix based systems and in windows. If there are any problems please create an issue and we will look into it.
## Dependencies ##
Please install these dependencies on your system.
* libclang
* cmake
* make
* clang or gcc (compiler)
## Download the source ##
There are two ways of downloading the source
### Download the zip ###
You can download the zip [here](https://github.com/cppit/libclangmm/archive/master.zip).
// after you can use various methods to get locations
// for tokens for syntax highlighting of refactoring
// the buffer map should contain all open files. I.e in an text editor
// you could have more than one file open at the same time. Putting the
// files in this std::map will make the translationunit be reparsed
// from memory instead of from file.
tu.ReparseTranslationUnit(path, buffers);
// zero is the start of the buffer
clang::SourceLocation start(&tu, path, 0);
// the 129 value is arbitrary, you must set it to the size of your
// buffer (the number of chars in the buffer)
clang::SourceLocation end(&tu, path, 129);
clang::SourceRange range(&start, &end);
clang::Tokens tokens(&tu, &range);
# Tests #
The compilation of the tests are disabled due to ease of installation. Simply enter CMakeList.txt and uncomment the last two lines in the file to enable testing.
// now tokens are stored in "tokens" we can extract ranges that are