clang API Documentation
00001 //===--- Program.h - Cross-translation unit information ---------*- 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 // This file declares the idx::Program interface. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_CLANG_INDEX_PROGRAM_H 00015 #define LLVM_CLANG_INDEX_PROGRAM_H 00016 00017 namespace clang { 00018 class ASTContext; 00019 00020 namespace idx { 00021 class EntityHandler; 00022 00023 /// \brief Top level object that owns and maintains information 00024 /// that is common across translation units. 00025 class Program { 00026 void *Impl; 00027 00028 Program(const Program&); // do not implement 00029 Program &operator=(const Program &); // do not implement 00030 friend class Entity; 00031 friend class GlobalSelector; 00032 00033 public: 00034 Program(); 00035 ~Program(); 00036 00037 /// \brief Traverses the AST and passes all the entities to the Handler. 00038 void FindEntities(ASTContext &Ctx, EntityHandler &Handler); 00039 }; 00040 00041 } // namespace idx 00042 00043 } // namespace clang 00044 00045 #endif