Diagram translation unit visitor base class. More...
Diagram translation unit visitor base class.
This class provides common interface for diagram translation unit visitors.
Definition at line 54 of file translation_unit_visitor.h.
#include <translation_unit_visitor.h>
Public Types | |
using | config_t = ConfigT |
using | diagram_t = DiagramT |
Public Member Functions | |
translation_unit_visitor (clang::SourceManager &sm, DiagramT &diagram, const ConfigT &config) | |
Constructor. | |
virtual | ~translation_unit_visitor ()=default |
void | set_tu_path (const std::string &translation_unit_path) |
const std::filesystem::path & | tu_path () const |
Return relative path to current translation unit. | |
common::visitor::ast_id_mapper & | id_mapper () const |
Get reference to Clang AST to clang-uml id mapper. | |
clang::SourceManager & | source_manager () const |
Get clang::SourceManager. | |
void | set_source_location (const clang::Decl &decl, clanguml::common::model::source_location &element) |
Set source location in diagram element. | |
void | set_source_location (const clang::Expr &expr, clanguml::common::model::source_location &element) |
Set source location in diagram element. | |
void | set_source_location (const clang::Stmt &stmt, clanguml::common::model::source_location &element) |
void | set_qualified_name (const clang::NamedDecl &decl, clanguml::common::model::element &element) |
void | set_source_location (const clang::SourceLocation &location, clanguml::common::model::source_location &element) |
Set source location in diagram element. | |
void | set_owning_module (const clang::Decl &decl, clanguml::common::model::element &element) |
virtual void | add_diagram_element (std::unique_ptr< common::model::template_element > element) |
void | process_comment (const clang::NamedDecl &decl, clanguml::common::model::decorated_element &e) |
Process comment directives in comment attached to a declaration. | |
std::string | process_comment (const clang::RawComment *comment, clang::DiagnosticsEngine &de, clanguml::common::model::decorated_element &e) |
Process comment directives in raw comment. | |
bool | skip_system_header_decl (const clang::NamedDecl *decl) const |
bool | should_include (const clang::NamedDecl *decl) const |
Check if the diagram should include a declaration. | |
DiagramT & | diagram () |
Get diagram model reference. | |
const DiagramT & | diagram () const |
Get diagram model reference. | |
const ConfigT & | config () const |
Get diagram config instance. | |
Protected Member Functions | |
std::set< const clang::RawComment * > & | processed_comments () |
std::string | get_file_path (const std::string &file_location) const |
Private Attributes | |
DiagramT & | diagram_ |
const ConfigT & | config_ |
clang::SourceManager & | source_manager_ |
std::unique_ptr< comment::comment_visitor > | comment_visitor_ |
std::filesystem::path | relative_to_path_ |
std::filesystem::path | translation_unit_path_ |
std::set< const clang::RawComment * > | processed_comments_ |
common::visitor::ast_id_mapper | id_mapper_ |
using clanguml::common::visitor::translation_unit_visitor< ConfigT, DiagramT >::config_t = ConfigT |
Definition at line 56 of file translation_unit_visitor.h.
using clanguml::common::visitor::translation_unit_visitor< ConfigT, DiagramT >::diagram_t = DiagramT |
Definition at line 57 of file translation_unit_visitor.h.
|
inlineexplicit |
Constructor.
sm | Reference to clang::SourceManager instance |
config | Reference to clanguml::config::diagram configuration instance |
Definition at line 66 of file translation_unit_visitor.h.
|
virtualdefault |
|
inlinevirtual |
Reimplemented in clanguml::class_diagram::visitor::translation_unit_visitor.
Definition at line 189 of file translation_unit_visitor.h.
|
inline |
Get diagram config instance.
Definition at line 298 of file translation_unit_visitor.h.
|
inline |
Get diagram model reference.
Definition at line 284 of file translation_unit_visitor.h.
|
inline |
Get diagram model reference.
Definition at line 291 of file translation_unit_visitor.h.
|
inlineprotected |
Definition at line 306 of file translation_unit_visitor.h.
|
inline |
Get reference to Clang AST to clang-uml id mapper.
Definition at line 106 of file translation_unit_visitor.h.
|
inline |
Process comment directives in comment attached to a declaration.
decl | Reference to clang::NamedDecl |
element | Reference to element to be updated |
Definition at line 200 of file translation_unit_visitor.h.
|
inline |
Process comment directives in raw comment.
comment | clang::RawComment pointer |
de | Reference to clang::DiagnosticsEngine |
element | Reference to element to be updated |
Definition at line 220 of file translation_unit_visitor.h.
|
inlineprotected |
Definition at line 301 of file translation_unit_visitor.h.
|
inline |
Definition at line 167 of file translation_unit_visitor.h.
|
inline |
Definition at line 145 of file translation_unit_visitor.h.
|
inline |
Set source location in diagram element.
decl | Reference to clang::Decl |
element | Reference to element to be updated |
Definition at line 121 of file translation_unit_visitor.h.
|
inline |
Set source location in diagram element.
expr | Reference to clang::Expr |
element | Reference to element to be updated |
Definition at line 133 of file translation_unit_visitor.h.
|
inline |
Set source location in diagram element.
location | Reference to clang::SourceLocation |
element | Reference to element to be updated |
Definition at line 160 of file translation_unit_visitor.h.
|
inline |
Definition at line 139 of file translation_unit_visitor.h.
|
inline |
Definition at line 85 of file translation_unit_visitor.h.
|
inline |
Check if the diagram should include a declaration.
decl | Clang declaration. |
Definition at line 256 of file translation_unit_visitor.h.
|
inline |
Definition at line 243 of file translation_unit_visitor.h.
|
inline |
Get clang::SourceManager.
Definition at line 113 of file translation_unit_visitor.h.
|
inline |
Return relative path to current translation unit.
Definition at line 96 of file translation_unit_visitor.h.
|
private |
Definition at line 328 of file translation_unit_visitor.h.
|
private |
Definition at line 324 of file translation_unit_visitor.h.
|
private |
Definition at line 321 of file translation_unit_visitor.h.
|
mutableprivate |
Definition at line 336 of file translation_unit_visitor.h.
|
private |
Definition at line 334 of file translation_unit_visitor.h.
|
private |
Definition at line 330 of file translation_unit_visitor.h.
|
private |
Definition at line 326 of file translation_unit_visitor.h.
|
private |
Definition at line 332 of file translation_unit_visitor.h.