Files
Sourcetrail/src/lib_cxx/data/parser/cxx/CxxContext.h
T
malte_langkabel 9e4a02a33a src: added optional indexer AST logging
* removed old AstVisitor
* added new implementation called CxxAstVisitor
* added CxxVerboseAstVisitor that may wrap the CxxAstVisitor to log the AST while visiting
* added the same structure for the Java visitors
* removed all the logs that were fired when recording stuff
* Added UI setting for verbose indexer logging.
* implemented AST name obfuscation for Java and Cxx
* unified test visitors for Java and Cxx
* implemented recording using directive decl
* removed most of the old onXxxParsed methods
2016-11-01 10:37:30 +01:00

45 lines
967 B
C++

#ifndef CXX_CONTEXT_H
#define CXX_CONTEXT_H
#include <clang/AST/Decl.h>
#include "data/name/NameHierarchy.h"
#include "utility/Cache.h"
typedef Cache<const clang::NamedDecl*, NameHierarchy> DeclNameCache;
typedef Cache<const clang::Type*, NameHierarchy> TypeNameCache;
class CxxContext
{
public:
virtual ~CxxContext();
virtual NameHierarchy getName() = 0;
};
class CxxContextDecl: public CxxContext
{
public:
CxxContextDecl(const clang::NamedDecl* decl, std::shared_ptr<DeclNameCache> nameCache);
virtual ~CxxContextDecl();
virtual NameHierarchy getName();
private:
const clang::NamedDecl* m_decl;
std::shared_ptr<DeclNameCache> m_nameCache;
};
class CxxContextType: public CxxContext
{
public:
CxxContextType(const clang::Type* type, std::shared_ptr<TypeNameCache> nameCache);
virtual ~CxxContextType();
virtual NameHierarchy getName();
private:
const clang::Type* m_type;
std::shared_ptr<TypeNameCache> m_nameCache;
};
#endif // CXX_CONTEXT_H