Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CppImport::CppImportLogger Class Reference

Public Types

enum class  Reason : int { OTHER , NOT_SUPPORTED , NO_PARENT , INSERT_PROBLEM }
 

Public Member Functions

 CppImportLogger ()
 
 ~CppImportLogger ()
 
void outputStatistics ()
 
void overloadedOpNotSupported (const clang::OverloadedOperatorKind &kind, const bool binary)
 
void primitiveTypeNotSupported (const QString &typeName)
 
void setSourceManager (const clang::SourceManager *sourceManager)
 
void storageClassNotSupported (const clang::StorageClass &sc)
 
void typeNotSupported (const clang::TypeLoc typeLoc, const clang::SourceLocation &location)
 
void unaryOpNotSupported (const clang::UnaryOperatorKind &kind)
 
void writeError (const QString &inWhichClass, const clang::Decl *decl, const Reason &r, const QString &reason={})
 
void writeError (const QString &inWhichClass, const clang::SourceLocation &loc, const Reason &r, const QString &reason={})
 
void writeError (const QString &inWhichClass, const clang::Stmt *stmt, const Reason &r, const QString &reason={})
 
void writeWarning (const QString &inWhichClass, const clang::Decl *decl, const Reason &r, const QString &reason={})
 
void writeWarning (const QString &inWhichClass, const clang::Stmt *stmt, const Reason &r, const QString &reason={})
 

Private Types

enum  OUTTYPE { ERROR , WARNING }
 

Private Member Functions

const QString getReasonString (const Reason &r)
 
void initStreams ()
 
void printStatistic (const char *message, const QMap< QString, int > &map)
 
void writeOut (const QString &inWhichClass, const clang::Decl *decl, OUTTYPE outType, const Reason &r, const QString &reason={})
 
void writeOut (const QString &inWhichClass, const clang::Stmt *stmt, OUTTYPE outType, const Reason &r, const QString &reason={})
 

Private Attributes

QMap< QString, int > countMap_
 
QTextStream * errStream_ {}
 
QMap< QString, int > overloadMap_
 
const QString reasons_ [4] = {"_O", "_NS", "_NP", "_IP"}
 
const clang::SourceManager * sourceManger_ {}
 
QMap< QString, int > storageMap_
 
QMap< QString, int > typeCountMap_
 
QMap< QString, int > unaryOpMap_
 
QTextStream * warnStream_ {}
 
bool writeToFile_ {false}
 

Member Enumeration Documentation

◆ OUTTYPE

Enumerator
ERROR 
WARNING 

◆ Reason

Enumerator
OTHER 
NOT_SUPPORTED 
NO_PARENT 
INSERT_PROBLEM 

Constructor & Destructor Documentation

◆ CppImportLogger()

CppImport::CppImportLogger::CppImportLogger ( )

◆ ~CppImportLogger()

CppImport::CppImportLogger::~CppImportLogger ( )

Member Function Documentation

◆ getReasonString()

const QString CppImport::CppImportLogger::getReasonString ( const Reason r)
private

◆ initStreams()

void CppImport::CppImportLogger::initStreams ( )
private

◆ outputStatistics()

void CppImport::CppImportLogger::outputStatistics ( )

◆ overloadedOpNotSupported()

void CppImport::CppImportLogger::overloadedOpNotSupported ( const clang::OverloadedOperatorKind &  kind,
const bool  binary 
)

◆ primitiveTypeNotSupported()

void CppImport::CppImportLogger::primitiveTypeNotSupported ( const QString &  typeName)

◆ printStatistic()

void CppImport::CppImportLogger::printStatistic ( const char *  message,
const QMap< QString, int > &  map 
)
private

◆ setSourceManager()

void CppImport::CppImportLogger::setSourceManager ( const clang::SourceManager *  sourceManager)

◆ storageClassNotSupported()

void CppImport::CppImportLogger::storageClassNotSupported ( const clang::StorageClass &  sc)

◆ typeNotSupported()

void CppImport::CppImportLogger::typeNotSupported ( const clang::TypeLoc  typeLoc,
const clang::SourceLocation &  location 
)

◆ unaryOpNotSupported()

void CppImport::CppImportLogger::unaryOpNotSupported ( const clang::UnaryOperatorKind &  kind)

◆ writeError() [1/3]

void CppImport::CppImportLogger::writeError ( const QString &  inWhichClass,
const clang::Decl *  decl,
const Reason r,
const QString &  reason = {} 
)
inline

◆ writeError() [2/3]

void CppImport::CppImportLogger::writeError ( const QString &  inWhichClass,
const clang::SourceLocation &  loc,
const Reason r,
const QString &  reason = {} 
)

◆ writeError() [3/3]

void CppImport::CppImportLogger::writeError ( const QString &  inWhichClass,
const clang::Stmt *  stmt,
const Reason r,
const QString &  reason = {} 
)
inline

◆ writeOut() [1/2]

void CppImport::CppImportLogger::writeOut ( const QString &  inWhichClass,
const clang::Decl *  decl,
OUTTYPE  outType,
const Reason r,
const QString &  reason = {} 
)
private

◆ writeOut() [2/2]

void CppImport::CppImportLogger::writeOut ( const QString &  inWhichClass,
const clang::Stmt *  stmt,
OUTTYPE  outType,
const Reason r,
const QString &  reason = {} 
)
private

◆ writeWarning() [1/2]

void CppImport::CppImportLogger::writeWarning ( const QString &  inWhichClass,
const clang::Decl *  decl,
const Reason r,
const QString &  reason = {} 
)
inline

◆ writeWarning() [2/2]

void CppImport::CppImportLogger::writeWarning ( const QString &  inWhichClass,
const clang::Stmt *  stmt,
const Reason r,
const QString &  reason = {} 
)
inline

Member Data Documentation

◆ countMap_

QMap<QString, int> CppImport::CppImportLogger::countMap_
private

◆ errStream_

QTextStream* CppImport::CppImportLogger::errStream_ {}
private

◆ overloadMap_

QMap<QString, int> CppImport::CppImportLogger::overloadMap_
private

◆ reasons_

const QString CppImport::CppImportLogger::reasons_[4] = {"_O", "_NS", "_NP", "_IP"}
private

◆ sourceManger_

const clang::SourceManager* CppImport::CppImportLogger::sourceManger_ {}
private

◆ storageMap_

QMap<QString, int> CppImport::CppImportLogger::storageMap_
private

◆ typeCountMap_

QMap<QString, int> CppImport::CppImportLogger::typeCountMap_
private

◆ unaryOpMap_

QMap<QString, int> CppImport::CppImportLogger::unaryOpMap_
private

◆ warnStream_

QTextStream* CppImport::CppImportLogger::warnStream_ {}
private

◆ writeToFile_

bool CppImport::CppImportLogger::writeToFile_ {false}
private