#ifndef TRANSLATIONUNIT_H_ #define TRANSLATIONUNIT_H_ #include #include #include #include #include #include "Index.h" namespace clang { class Token; class Tokens; class SourceLocation; class SourceRange; class Cursor; class CodeCompleteResults; class TranslationUnit { public: TranslationUnit(Index *index, const std::string &filepath, const std::vector &command_line_args); TranslationUnit(Index *index, const std::string &filepath, const std::vector &command_line_args, const std::map &buffers); TranslationUnit(Index *index, const std::string &filepath); ~TranslationUnit(); TranslationUnit() { } TranslationUnit& operator=(const TranslationUnit &tu); int ReparseTranslationUnit(const std::string &file_path, const std::map &buffers); private: friend Token; friend Tokens; friend SourceLocation; friend SourceRange; friend Cursor; friend CodeCompleteResults; CXTranslationUnit tu_; unsigned flags=CXTranslationUnit_CacheCompletionResults | CXTranslationUnit_PrecompiledPreamble | CXTranslationUnit_Incomplete; }; } // namespace clang #endif // TRANSLATIONUNIT_H_