Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
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
10using namespace std;
11
12namespace ReflectiveRapidJSON {
13
18 : m_factory(factory)
19{
20}
21
25bool Visitor::VisitDecl(clang::Decl *decl)
26{
27 m_factory.addDeclaration(decl);
28 return true;
29}
30
36{
37 CPP_UTILITIES_UNUSED(func)
38 return true;
39}
40
45{
46 CPP_UTILITIES_UNUSED(st)
47 return true;
48}
49
53bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
54{
55 CPP_UTILITIES_UNUSED(decl)
56 return true;
57}
58
62bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
63{
64 CPP_UTILITIES_UNUSED(decl)
65 return true;
66}
67
68} // namespace ReflectiveRapidJSON
The CodeFactory class produces additional (reflection) code for a specified list of C++ source files.
Definition codefactory.h:27
bool VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
Visits classes and class templates.
Definition visitor.cpp:62
bool VisitDecl(clang::Decl *decl)
Adds any kind of declaration to the factory.
Definition visitor.cpp:25
Visitor(CodeFactory &factory)
Constructs a new Visitor.
Definition visitor.cpp:17
bool VisitNamespaceDecl(clang::NamespaceDecl *decl)
Visits namespace declarations.
Definition visitor.cpp:53
bool VisitStmt(clang::Stmt *st)
Visits statements.
Definition visitor.cpp:44
bool VisitFunctionDecl(clang::FunctionDecl *func)
Visits function declarations.
Definition visitor.cpp:35