Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
Loading...
Searching...
No Matches
ReflectiveRapidJSON::DiagConsumer Class Reference

The DiagConsumer class allows turning most errors into warnings. More...

#include <consumer.h>

Inheritance diagram for ReflectiveRapidJSON::DiagConsumer:
[legend]
Collaboration diagram for ReflectiveRapidJSON::DiagConsumer:
[legend]

Public Member Functions

 DiagConsumer (std::unique_ptr< DiagnosticConsumer > previous, bool errorResilient)
unsigned int realErrorCount () const
 Returns the number of errors which actually would have been occurred if we would not turn most errors into warnings.
void BeginSourceFile (const clang::LangOptions &langOpts, const clang::Preprocessor *pp=nullptr) override
void clear () override
void EndSourceFile () override
void finish () override
void HandleDiagnostic (clang::DiagnosticsEngine::Level diagLevel, const clang::Diagnostic &info) override
 Turns most errors into warnings so the code generator can even work when parsing incomplete headers.

Detailed Description

The DiagConsumer class allows turning most errors into warnings.

Remarks
This class is based on MocDiagConsumer from https://github.com/woboq/moc-ng.

Definition at line 52 of file consumer.h.

Constructor & Destructor Documentation

◆ DiagConsumer()

ReflectiveRapidJSON::DiagConsumer::DiagConsumer ( std::unique_ptr< DiagnosticConsumer > previous,
bool errorResilient )
inline

Definition at line 71 of file consumer.h.

Member Function Documentation

◆ BeginSourceFile()

void ReflectiveRapidJSON::DiagConsumer::BeginSourceFile ( const clang::LangOptions & langOpts,
const clang::Preprocessor * pp = nullptr )
override

Definition at line 39 of file consumer.cpp.

◆ clear()

void ReflectiveRapidJSON::DiagConsumer::clear ( )
override

Definition at line 44 of file consumer.cpp.

◆ EndSourceFile()

void ReflectiveRapidJSON::DiagConsumer::EndSourceFile ( )
override

Definition at line 49 of file consumer.cpp.

◆ finish()

void ReflectiveRapidJSON::DiagConsumer::finish ( )
override

Definition at line 55 of file consumer.cpp.

◆ HandleDiagnostic()

void ReflectiveRapidJSON::DiagConsumer::HandleDiagnostic ( clang::DiagnosticsEngine::Level diagLevel,
const clang::Diagnostic & info )
override

Turns most errors into warnings so the code generator can even work when parsing incomplete headers.

Definition at line 64 of file consumer.cpp.

◆ realErrorCount()

unsigned int ReflectiveRapidJSON::DiagConsumer::realErrorCount ( ) const
inline

Returns the number of errors which actually would have been occurred if we would not turn most errors into warnings.

Definition at line 81 of file consumer.h.


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