KDevelop API Documentation

BackgroundParser Class Reference

#include <backgroundparser.h>

Inheritance diagram for BackgroundParser:

Inheritance graph
[legend]
Collaboration diagram for BackgroundParser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackgroundParser (ProblemReporter *reporter, const QString &source, const QString &filename)
virtual ~BackgroundParser ()
virtual void run ()
 BackgroundParser (CppSupportPart *, QWaitCondition *consumed)
virtual ~BackgroundParser ()
QMutex & mutex ()
void lock ()
void unlock ()
QWaitCondition & canParse ()
QWaitCondition & isEmpty ()
bool filesInQueue ()
void addFile (const QString &fileName, bool readFromDisk=false)
void removeFile (const QString &fileName)
void removeAllFiles ()
TranslationUnitAST * translationUnit (const QString &fileName)
QValueList< Problem > problems (const QString &fileName, bool readFromDisk=false, bool forceParse=false)
void updateParserConfiguration ()
void close ()
virtual void run ()
 BackgroundParser (JavaSupportPart *, QWaitCondition *consumed)
virtual ~BackgroundParser ()
QMutex & mutex ()
void lock ()
void unlock ()
QWaitCondition & canParse ()
QWaitCondition & isEmpty ()
bool filesInQueue ()
void addFile (const QString &fileName, bool readFromDisk=false)
void removeFile (const QString &fileName)
void removeAllFiles ()
RefJavaAST translationUnit (const QString &fileName)
QValueList< Problem > problems (const QString &fileName)
void close ()
virtual void run ()
 BackgroundParser (ProblemReporter *reporter, const QString &source, const QString &filename)
virtual ~BackgroundParser ()
virtual void run ()

Protected Member Functions

Unit * findUnit (const QString &fileName)
Unit * parseFile (const QString &fileName, bool readFromDisk, bool lock=false)
Unit * findUnit (const QString &fileName)
Unit * parseFile (const QString &fileName, bool readFromDisk)

Private Attributes

ProblemReporter * m_reporter
QString m_source
QString m_fileName
KDevDriver * m_driver
QString m_currentFile
QWaitCondition m_canParse
QWaitCondition m_isEmpty
QWaitCondition * m_consumed
QMutex m_mutex
SynchronizedFileList * m_fileList
CppSupportPart * m_cppSupport
bool m_close
QMap< QString, Unit * > m_unitDict
KDevDriver * m_driver
QWaitCondition * m_consumed
SynchronizedFileList * m_fileList
JavaSupportPart * m_javaSupport
QMap< QString, Unit * > m_unitDict
ProblemReporter * m_reporter

Constructor & Destructor Documentation

BackgroundParser::BackgroundParser (  ProblemReporter *  reporter,
const QString &  source,
const QString &  filename
) 
 

Definition at line 28 of file backgroundparser.cpp.

References length().

BackgroundParser::~BackgroundParser (   )  [virtual]
 

Definition at line 37 of file backgroundparser.cpp.

BackgroundParser::BackgroundParser (  CppSupportPart *  ,
QWaitCondition *  consumed
) 
 

Definition at line 183 of file backgroundparser.cpp.

References m_cppSupport, m_driver, m_fileList, Driver::parseFile(), and Driver::setSourceProvider().

virtual BackgroundParser::~BackgroundParser (   )  [virtual]
 

BackgroundParser::BackgroundParser (  JavaSupportPart *  ,
QWaitCondition *  consumed
) 
 

Definition at line 182 of file backgroundparser.cpp.

References m_driver, m_fileList, m_javaSupport, and Driver::setSourceProvider().

virtual BackgroundParser::~BackgroundParser (   )  [virtual]
 

BackgroundParser::BackgroundParser (  ProblemReporter *  reporter,
const QString &  source,
const QString &  filename
) 
 

virtual BackgroundParser::~BackgroundParser (   )  [virtual]
 


Member Function Documentation

void BackgroundParser::addFile (  const QString &  fileName,
bool  readFromDisk = false
) 
 

void BackgroundParser::addFile (  const QString &  fileName,
bool  readFromDisk = false
) 
 

Definition at line 208 of file backgroundparser.cpp.

References SynchronizedFileList::contains(), deepCopy(), m_canParse, m_fileList, and SynchronizedFileList::push_back().

Referenced by AddMethodDialog::accept(), AddAttributeDialog::accept(), QtDesignerIntegration::addFunctionToClass(), JavaSupportPart::partRemoved(), and CppSupportPart::partRemoved().

QWaitCondition& BackgroundParser::canParse (   )  [inline]
 

Definition at line 53 of file backgroundparser.h.

QWaitCondition& BackgroundParser::canParse (   )  [inline]
 

Definition at line 53 of file backgroundparser.h.

void BackgroundParser::close (   ) 
 

void BackgroundParser::close (   ) 
 

Definition at line 327 of file backgroundparser.cpp.

References m_canParse, m_close, and m_mutex.

Referenced by CppSupportPart::~CppSupportPart(), and JavaSupportPart::~JavaSupportPart().

bool BackgroundParser::filesInQueue (   ) 
 

bool BackgroundParser::filesInQueue (   ) 
 

Definition at line 337 of file backgroundparser.cpp.

References SynchronizedFileList::count(), m_currentFile, m_fileList, and m_mutex.

Unit* BackgroundParser::findUnit (  const QString &  fileName  )  [protected]
 

Unit * BackgroundParser::findUnit (  const QString &  fileName  )  [protected]
 

Definition at line 299 of file backgroundparser.cpp.

References m_unitDict.

Referenced by problems(), removeFile(), and translationUnit().

QWaitCondition& BackgroundParser::isEmpty (   )  [inline]
 

Definition at line 54 of file backgroundparser.h.

QWaitCondition& BackgroundParser::isEmpty (   )  [inline]
 

Definition at line 54 of file backgroundparser.h.

void BackgroundParser::lock (   )  [inline]
 

Definition at line 50 of file backgroundparser.h.

References m_mutex.

void BackgroundParser::lock (   )  [inline]
 

Definition at line 50 of file backgroundparser.h.

References m_mutex.

Referenced by JavaSupportPart::customEvent(), CppSupportPart::MakeMemberHelper(), CppSupportPart::recomputeCodeModel(), CppSupportPart::slotMakeMember(), and CppSupportPart::slotNeedTextHint().

QMutex& BackgroundParser::mutex (   )  [inline]
 

Definition at line 49 of file backgroundparser.h.

QMutex& BackgroundParser::mutex (   )  [inline]
 

Definition at line 49 of file backgroundparser.h.

Unit * BackgroundParser::parseFile (  const QString &  fileName,
bool  readFromDisk
)  [protected]
 

Definition at line 250 of file backgroundparser.cpp.

References SynchronizedFileList::contains(), Unit::fileName, SynchronizedFileList::isEmpty(), kdDebug(), m_currentFile, m_driver, m_fileList, m_isEmpty, m_javaSupport, m_unitDict, Driver::parseFile(), Driver::problems(), Unit::problems, RefJavaAST, Driver::remove(), Driver::sourceProvider(), Driver::takeTranslationUnit(), Unit::translationUnit, and translationUnit().

Unit * BackgroundParser::parseFile (  const QString &  fileName,
bool  readFromDisk,
bool  lock = false
)  [protected]
 

Definition at line 256 of file backgroundparser.cpp.

References Unit::fileName, SynchronizedFileList::isEmpty(), m_cppSupport, m_currentFile, m_driver, m_fileList, m_isEmpty, m_mutex, m_unitDict, Driver::parseFile(), Driver::problems(), Unit::problems, Driver::remove(), Driver::removeAllMacrosInFile(), Driver::sourceProvider(), Driver::takeTranslationUnit(), Unit::translationUnit, and translationUnit().

Referenced by problems(), and translationUnit().

QValueList< Problem > BackgroundParser::problems (  const QString &  fileName  ) 
 

Definition at line 305 of file backgroundparser.cpp.

References findUnit(), m_fileList, parseFile(), Unit::problems, and SynchronizedFileList::remove().

QValueList< Problem > BackgroundParser::problems (  const QString &  fileName,
bool  readFromDisk = false,
bool  forceParse = false
) 
 

Definition at line 316 of file backgroundparser.cpp.

References findUnit(), m_fileList, parseFile(), Unit::problems, and SynchronizedFileList::remove().

Referenced by ProblemReporter::closedFile().

void BackgroundParser::removeAllFiles (   ) 
 

void BackgroundParser::removeAllFiles (   ) 
 

Definition at line 222 of file backgroundparser.cpp.

References SynchronizedFileList::clear(), kdDebug(), m_driver, m_fileList, m_isEmpty, m_mutex, m_unitDict, and Driver::reset().

Referenced by JavaSupportPart::projectClosed().

void BackgroundParser::removeFile (  const QString &  fileName  ) 
 

void BackgroundParser::removeFile (  const QString &  fileName  ) 
 

Definition at line 241 of file backgroundparser.cpp.

References findUnit(), SynchronizedFileList::isEmpty(), m_driver, m_fileList, m_isEmpty, m_mutex, m_unitDict, and Driver::remove().

Referenced by JavaSupportPart::partRemoved(), CppSupportPart::partRemoved(), JavaSupportPart::removedFilesFromProject(), and CppSupportPart::removedFilesFromProject().

virtual void BackgroundParser::run (   )  [virtual]
 

virtual void BackgroundParser::run (   )  [virtual]
 

virtual void BackgroundParser::run (   )  [virtual]
 

void BackgroundParser::run (   )  [virtual]
 

Definition at line 41 of file backgroundparser.cpp.

References AdaParser::compilation_unit(), AdaParser::initializeASTFactory(), kdDebug(), m_fileName, m_reporter, m_source, JAVADebugger::parser, ProblemReporter::reportError(), AdaParser::resetErrors(), AdaLexer::resetErrors(), AdaParser::setProblemReporter(), and AdaLexer::setProblemReporter().

RefJavaAST BackgroundParser::translationUnit (  const QString &  fileName  ) 
 

RefJavaAST BackgroundParser::translationUnit (  const QString &  fileName  ) 
 

Definition at line 305 of file backgroundparser.cpp.

References findUnit(), m_fileList, parseFile(), SynchronizedFileList::remove(), and Unit::translationUnit.

Referenced by QtDesignerIntegration::addFunctionToClass(), JavaSupportPart::customEvent(), CppSupportPart::MakeMemberHelper(), parseFile(), CppSupportPart::recomputeCodeModel(), and CppSupportPart::slotNeedTextHint().

void BackgroundParser::unlock (   )  [inline]
 

Definition at line 51 of file backgroundparser.h.

References m_mutex.

void BackgroundParser::unlock (   )  [inline]
 

Definition at line 51 of file backgroundparser.h.

References m_mutex.

Referenced by JavaSupportPart::customEvent(), CppSupportPart::MakeMemberHelper(), CppSupportPart::recomputeCodeModel(), CppSupportPart::slotMakeMember(), and CppSupportPart::slotNeedTextHint().

void BackgroundParser::updateParserConfiguration (   ) 
 

Definition at line 344 of file backgroundparser.cpp.

References m_cppSupport, m_driver, m_mutex, Driver::parseFile(), Driver::removeAllMacrosInFile(), and CppSupportPart::specialHeaderName().

Referenced by CppSupportPart::updateParserConfiguration().


Member Data Documentation

QWaitCondition BackgroundParser::m_canParse [private]
 

Definition at line 76 of file backgroundparser.h.

Referenced by addFile(), and close().

bool BackgroundParser::m_close [private]
 

Definition at line 82 of file backgroundparser.h.

Referenced by close().

QWaitCondition* BackgroundParser::m_consumed [private]
 

Definition at line 78 of file backgroundparser.h.

QWaitCondition* BackgroundParser::m_consumed [private]
 

Definition at line 79 of file backgroundparser.h.

CppSupportPart* BackgroundParser::m_cppSupport [private]
 

Definition at line 82 of file backgroundparser.h.

Referenced by BackgroundParser(), parseFile(), and updateParserConfiguration().

QString BackgroundParser::m_currentFile [private]
 

Definition at line 75 of file backgroundparser.h.

Referenced by filesInQueue(), and parseFile().

class KDevDriver* BackgroundParser::m_driver [private]
 

Definition at line 74 of file backgroundparser.h.

class KDevDriver* BackgroundParser::m_driver [private]
 

Definition at line 75 of file backgroundparser.h.

Referenced by BackgroundParser(), parseFile(), removeAllFiles(), removeFile(), and updateParserConfiguration().

SynchronizedFileList* BackgroundParser::m_fileList [private]
 

Definition at line 80 of file backgroundparser.h.

SynchronizedFileList* BackgroundParser::m_fileList [private]
 

Definition at line 81 of file backgroundparser.h.

Referenced by addFile(), BackgroundParser(), filesInQueue(), parseFile(), problems(), removeAllFiles(), removeFile(), and translationUnit().

QString BackgroundParser::m_fileName [private]
 

Definition at line 32 of file backgroundparser.h.

Referenced by run().

QWaitCondition BackgroundParser::m_isEmpty [private]
 

Definition at line 77 of file backgroundparser.h.

Referenced by parseFile(), removeAllFiles(), and removeFile().

JavaSupportPart* BackgroundParser::m_javaSupport [private]
 

Definition at line 81 of file backgroundparser.h.

Referenced by BackgroundParser(), and parseFile().

QMutex BackgroundParser::m_mutex [private]
 

Definition at line 79 of file backgroundparser.h.

Referenced by close(), filesInQueue(), lock(), parseFile(), removeAllFiles(), removeFile(), unlock(), and updateParserConfiguration().

ProblemReporter* BackgroundParser::m_reporter [private]
 

Definition at line 30 of file backgroundparser.h.

ProblemReporter* BackgroundParser::m_reporter [private]
 

Definition at line 32 of file backgroundparser.h.

Referenced by run().

QString BackgroundParser::m_source [private]
 

Definition at line 31 of file backgroundparser.h.

Referenced by run().

QMap<QString, Unit*> BackgroundParser::m_unitDict [private]
 

Definition at line 83 of file backgroundparser.h.

QMap<QString, Unit*> BackgroundParser::m_unitDict [private]
 

Definition at line 84 of file backgroundparser.h.

Referenced by findUnit(), parseFile(), removeAllFiles(), and removeFile().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:37:04 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003