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

The Visitor class is used to traverse the elements of a translation unit. More...

#include <visitor.h>

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

Public Member Functions

 Visitor (CodeFactory &factory)
 Constructs a new Visitor.
bool VisitDecl (clang::Decl *decl)
 Adds any kind of declaration to the factory.
bool VisitFunctionDecl (clang::FunctionDecl *func)
 Visits function declarations.
bool VisitStmt (clang::Stmt *st)
 Visits statements.
bool VisitNamespaceDecl (clang::NamespaceDecl *decl)
 Visits namespace declarations.
bool VisitCXXRecordDecl (clang::CXXRecordDecl *decl)
 Visits classes and class templates.

Detailed Description

The Visitor class is used to traverse the elements of a translation unit.

For this purpose, it is instantiated by the Consumer class.

Definition at line 15 of file visitor.h.

Constructor & Destructor Documentation

◆ Visitor()

ReflectiveRapidJSON::Visitor::Visitor ( CodeFactory & factory)
explicit

Constructs a new Visitor.

Definition at line 17 of file visitor.cpp.

Member Function Documentation

◆ VisitCXXRecordDecl()

bool ReflectiveRapidJSON::Visitor::VisitCXXRecordDecl ( clang::CXXRecordDecl * decl)

Visits classes and class templates.

Currently not used.

Definition at line 62 of file visitor.cpp.

◆ VisitDecl()

bool ReflectiveRapidJSON::Visitor::VisitDecl ( clang::Decl * decl)

Adds any kind of declaration to the factory.

Definition at line 25 of file visitor.cpp.

◆ VisitFunctionDecl()

bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl ( clang::FunctionDecl * func)

Visits function declarations.

Currently not used.

Remarks
Might be used later to detect functions.

Definition at line 35 of file visitor.cpp.

◆ VisitNamespaceDecl()

bool ReflectiveRapidJSON::Visitor::VisitNamespaceDecl ( clang::NamespaceDecl * decl)

Visits namespace declarations.

Currently not used.

Definition at line 53 of file visitor.cpp.

◆ VisitStmt()

bool ReflectiveRapidJSON::Visitor::VisitStmt ( clang::Stmt * st)

Visits statements.

Currently not used.

Definition at line 44 of file visitor.cpp.


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