Reflection for RapidJSON
0.0.17
Reflection for serializing/deserializing with RapidJSON
Toggle main menu visibility
Loading...
Searching...
No Matches
visitor.cpp
Go to the documentation of this file.
1
#include "
./visitor.h
"
2
#include "
./codefactory.h
"
3
4
#include <c++utilities/application/global.h>
5
6
#include <clang/AST/CXXInheritance.h>
7
8
#include <iostream>
9
10
using namespace
std;
11
12
namespace
ReflectiveRapidJSON
{
13
17
Visitor::Visitor
(
CodeFactory
&factory)
18
: m_factory(factory)
19
{
20
}
21
25
bool
Visitor::VisitDecl
(clang::Decl *decl)
26
{
27
m_factory.addDeclaration(decl);
28
return
true
;
29
}
30
35
bool
ReflectiveRapidJSON::Visitor::VisitFunctionDecl
(clang::FunctionDecl *func)
36
{
37
CPP_UTILITIES_UNUSED(func)
38
return
true
;
39
}
40
44
bool
ReflectiveRapidJSON::Visitor::VisitStmt
(clang::Stmt *st)
45
{
46
CPP_UTILITIES_UNUSED(st)
47
return
true
;
48
}
49
53
bool
Visitor::VisitNamespaceDecl
(clang::NamespaceDecl *decl)
54
{
55
CPP_UTILITIES_UNUSED(decl)
56
return
true
;
57
}
58
62
bool
Visitor::VisitCXXRecordDecl
(clang::CXXRecordDecl *decl)
63
{
64
CPP_UTILITIES_UNUSED(decl)
65
return
true
;
66
}
67
68
}
// namespace ReflectiveRapidJSON
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
codefactory.h
ReflectiveRapidJSON
Definition
codegenerator.h:15
visitor.h
Generated on
for Reflection for RapidJSON by
1.18.0