clang API Documentation

TranslationUnit.h
Go to the documentation of this file.
00001 //===--- TranslationUnit.h - Interface for a translation unit ---*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //  Abstract interface for a translation unit.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_CLANG_INDEX_TRANSLATIONUNIT_H
00015 #define LLVM_CLANG_INDEX_TRANSLATIONUNIT_H
00016 
00017 namespace clang {
00018   class ASTContext;
00019   class DiagnosticsEngine;
00020   class Preprocessor;
00021 
00022 namespace idx {
00023   class DeclReferenceMap;
00024   class SelectorMap;
00025 
00026 /// \brief Abstract interface for a translation unit.
00027 class TranslationUnit {
00028 public:
00029   virtual ~TranslationUnit();
00030   virtual ASTContext &getASTContext() = 0;
00031   virtual Preprocessor &getPreprocessor() = 0;
00032   virtual DiagnosticsEngine &getDiagnostic() = 0;
00033   virtual DeclReferenceMap &getDeclReferenceMap() = 0;
00034   virtual SelectorMap &getSelectorMap() = 0;
00035 };
00036 
00037 } // namespace idx
00038 
00039 } // namespace clang
00040 
00041 #endif