Refactored template_builder to common namespace (#227)

This commit is contained in:
Bartek Kryza
2024-01-14 13:38:08 +01:00
parent 100f7c88ad
commit 16195bfa62
18 changed files with 545 additions and 359 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -18,8 +18,9 @@
#pragma once
#include "comment/comment_visitor.h"
#include "common/model/element.h"
#include "common/model/source_location.h"
#include "common/model/template_element.h"
#include "common/visitor/ast_id_mapper.h"
#include "config/config.h"
#include <clang/AST/Comment.h>
@@ -65,6 +66,13 @@ public:
*/
const std::filesystem::path &tu_path() const;
/**
* @brief Get reference to Clang AST to clang-uml id mapper
*
* @return Reference to Clang AST to clang-uml id mapper
*/
common::visitor::ast_id_mapper &id_mapper() const { return id_mapper_; }
/**
* @brief Get clang::SourceManager
* @return Reference to @ref clang::SourceManager used by this translation
@@ -105,6 +113,11 @@ public:
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)
{
}
protected:
/**
* @brief Process comment directives in comment attached to a declaration
@@ -136,5 +149,7 @@ private:
std::filesystem::path translation_unit_path_;
std::set<const clang::RawComment *> processed_comments_;
mutable common::visitor::ast_id_mapper id_mapper_;
};
} // namespace clanguml::common::visitor