1 //===--- TranslationUnit.h - Interface for a translation unit ---*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // Abstract interface for a translation unit. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_CLANG_INDEX_TRANSLATIONUNIT_H 15 #define LLVM_CLANG_INDEX_TRANSLATIONUNIT_H 16 17 namespace clang { 18 class ASTContext; 19 class Diagnostic; 20 class Preprocessor; 21 22 namespace idx { 23 class DeclReferenceMap; 24 class SelectorMap; 25 26 /// \brief Abstract interface for a translation unit. 27 class TranslationUnit { 28 public: 29 virtual ~TranslationUnit(); 30 virtual ASTContext &getASTContext() = 0; 31 virtual Preprocessor &getPreprocessor() = 0; 32 virtual Diagnostic &getDiagnostic() = 0; 33 virtual DeclReferenceMap &getDeclReferenceMap() = 0; 34 virtual SelectorMap &getSelectorMap() = 0; 35 }; 36 37 } // namespace idx 38 39 } // namespace clang 40 41 #endif 42