Added initial support for include graph diagrams

This commit is contained in:
Bartek Kryza
2022-04-10 13:32:59 +02:00
parent 46e8885c41
commit ac624c9247
23 changed files with 378 additions and 61 deletions

View File

@@ -19,7 +19,7 @@
#include "common/model/diagram.h"
#include "common/model/package.h"
#include "source_file.h"
#include "common/model/source_file.h"
#include <type_safe/optional_ref.hpp>
@@ -29,8 +29,9 @@
namespace clanguml::include_diagram::model {
class diagram : public clanguml::common::model::diagram,
public clanguml::common::model::nested_trait<source_file,
filesystem_path> {
public clanguml::common::model::nested_trait<
clanguml::common::model::source_file,
clanguml::common::model::filesystem_path> {
public:
diagram() = default;
@@ -44,16 +45,15 @@ public:
type_safe::optional_ref<const common::model::diagram_element> get(
const std::string &full_name) const;
void add_file(std::unique_ptr<include_diagram::model::source_file> &&f);
void add_file(std::unique_ptr<common::model::source_file> &&f);
type_safe::optional_ref<const include_diagram::model::source_file> get_file(
type_safe::optional_ref<const common::model::source_file> get_file(
const std::string &name) const;
std::string to_alias(const std::string &full_name) const;
private:
std::vector<
type_safe::object_ref<const include_diagram::model::source_file, false>>
std::vector<type_safe::object_ref<const common::model::source_file, false>>
files_;
};
}