trick/trick_source/codegen/Interface_Code_Gen/TranslationUnitVisitor.hh
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

57 lines
1.3 KiB
C++

#ifndef TRANSLATIONUNITVISITOR_HH
#define TRANSLATIONUNITVISITOR_HH
#include <string>
#include <vector>
#include <set>
#include <map>
#include "clang/Frontend/CompilerInstance.h"
#include "clang/AST/RecursiveASTVisitor.h"
class CommentSaver ;
class ClassValues ;
class EnumValues ;
class HeaderSearchDirs ;
class PrintAttributes ;
/**
This is the top level AST visitor. This class dispatched nodes we are interested
in to lower level AST visitors. All class information is stored in this visitor.
@author Alexander S. Lin
@date July 2012
*/
class TranslationUnitVisitor : public clang::RecursiveASTVisitor<TranslationUnitVisitor> {
public:
TranslationUnitVisitor( clang::CompilerInstance & in_ci , HeaderSearchDirs & hsd ,
CommentSaver & cs , PrintAttributes & in_pa ) ;
/** custom node traversal function that dispatches nodes we are interested in
to lower level AST visitors */
bool TraverseDecl(clang::Decl *D);
private:
/** The compiler instance */
clang::CompilerInstance & ci ;
/** The header search directories */
HeaderSearchDirs & hsd ;
/** Holds all comments */
CommentSaver & cs ;
/** attributes printer */
PrintAttributes & pa ;
std::map < std::string , std::set< std::string > > fwd_declared_classes ;
} ;
#endif