Doxygen
Loading...
Searching...
No Matches
ClangParser Class Reference

Wrapper for to let libclang assisted parsing. More...

#include <src/clangparser.h>

+ Collaboration diagram for ClangParser:

Classes

class  Private
 

Public Member Functions

std::unique_ptr< ClangTUParsercreateTUParser (const FileDef *fd) const
 

Static Public Member Functions

static ClangParserinstance ()
 Returns the one and only instance of the class.
 

Private Member Functions

const clang::tooling::CompilationDatabase * database () const
 
 ClangParser ()
 
virtual ~ClangParser ()
 

Private Attributes

std::unique_ptr< Privatep
 

Static Private Attributes

static ClangParsers_instance = nullptr
 

Friends

class ClangTUParser
 

Detailed Description

Wrapper for to let libclang assisted parsing.

Definition at line 79 of file clangparser.h.

Constructor & Destructor Documentation

◆ ClangParser()

ClangParser::ClangParser ( )
private

Definition at line 985 of file clangparser.cpp.

985 : p(std::make_unique<Private>())
986{
987}
std::unique_ptr< Private > p
Definition clangparser.h:90

References p.

Referenced by ClangTUParser, and instance().

◆ ~ClangParser()

ClangParser::~ClangParser ( )
privatevirtual

Definition at line 989 of file clangparser.cpp.

990{
991}

Member Function Documentation

◆ createTUParser()

std::unique_ptr< ClangTUParser > ClangParser::createTUParser ( const FileDef * fd) const

Definition at line 993 of file clangparser.cpp.

994{
995 return nullptr;
996}

Referenced by generateFileSources(), parseFilesMultiThreading(), and parseFilesSingleThreading().

◆ database()

const clang::tooling::CompilationDatabase * ClangParser::database ( ) const
private

◆ instance()

ClangParser * ClangParser::instance ( )
static

Returns the one and only instance of the class.

Definition at line 33 of file clangparser.cpp.

34{
35 std::lock_guard<std::mutex> lock(g_clangMutex);
36 if (s_instance==nullptr) s_instance = new ClangParser;
37 return s_instance;
38}
static std::mutex g_clangMutex
static ClangParser * s_instance
Definition clangparser.h:94

References ClangParser(), g_clangMutex, and s_instance.

Referenced by generateFileSources(), parseFilesMultiThreading(), and parseFilesSingleThreading().

Friends And Related Symbol Documentation

◆ ClangTUParser

friend class ClangTUParser
friend

Definition at line 81 of file clangparser.h.

References ClangParser(), and ClangTUParser.

Referenced by ClangTUParser.

Member Data Documentation

◆ p

std::unique_ptr<Private> ClangParser::p
private

Definition at line 90 of file clangparser.h.

Referenced by ClangParser().

◆ s_instance

ClangParser * ClangParser::s_instance = nullptr
staticprivate

Definition at line 94 of file clangparser.h.

Referenced by instance().


The documentation for this class was generated from the following files: