Reflection for RapidJSON
0.0.17
Reflection for serializing/deserializing with RapidJSON
Toggle main menu visibility
Loading...
Searching...
No Matches
visitor.h
Go to the documentation of this file.
1
#ifndef REFLECTIVE_RAPIDJSON_VISITOR_H
2
#define REFLECTIVE_RAPIDJSON_VISITOR_H
3
4
#include <clang/AST/ASTContext.h>
5
#include <clang/AST/RecursiveASTVisitor.h>
6
#include <clang/Frontend/CompilerInstance.h>
7
8
namespace
ReflectiveRapidJSON
{
9
10
class
CodeFactory
;
11
15
class
Visitor
:
public
clang::RecursiveASTVisitor<Visitor> {
16
public
:
17
explicit
Visitor
(
CodeFactory
&factory);
18
bool
VisitDecl
(clang::Decl *decl);
19
bool
VisitFunctionDecl
(clang::FunctionDecl *func);
20
bool
VisitStmt
(clang::Stmt *st);
21
bool
VisitNamespaceDecl
(clang::NamespaceDecl *decl);
22
bool
VisitCXXRecordDecl
(clang::CXXRecordDecl *decl);
23
24
private
:
25
CodeFactory
&m_factory;
26
};
27
28
}
// namespace ReflectiveRapidJSON
29
30
#endif
// REFLECTIVE_RAPIDJSON_VISITOR_H
ReflectiveRapidJSON::CodeFactory
The CodeFactory class produces additional (reflection) code for a specified list of C++ source files.
Definition
codefactory.h:27
ReflectiveRapidJSON::Visitor::VisitCXXRecordDecl
bool VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
Visits classes and class templates.
Definition
visitor.cpp:62
ReflectiveRapidJSON::Visitor::VisitDecl
bool VisitDecl(clang::Decl *decl)
Adds any kind of declaration to the factory.
Definition
visitor.cpp:25
ReflectiveRapidJSON::Visitor::Visitor
Visitor(CodeFactory &factory)
Constructs a new Visitor.
Definition
visitor.cpp:17
ReflectiveRapidJSON::Visitor::VisitNamespaceDecl
bool VisitNamespaceDecl(clang::NamespaceDecl *decl)
Visits namespace declarations.
Definition
visitor.cpp:53
ReflectiveRapidJSON::Visitor::VisitStmt
bool VisitStmt(clang::Stmt *st)
Visits statements.
Definition
visitor.cpp:44
ReflectiveRapidJSON::Visitor::VisitFunctionDecl
bool VisitFunctionDecl(clang::FunctionDecl *func)
Visits function declarations.
Definition
visitor.cpp:35
ReflectiveRapidJSON
Definition
codegenerator.h:15
Generated on
for Reflection for RapidJSON by
1.18.0