Added PlantUML links generation in class diagrams

This commit is contained in:
Bartek Kryza
2022-03-20 22:57:17 +01:00
parent 3c30350edc
commit d7e27841bc
15 changed files with 351 additions and 14 deletions

View File

@@ -34,4 +34,12 @@ std::string class_element::name() const { return name_; }
std::string class_element::type() const { return type_; }
inja::json class_element::context() const
{
inja::json ctx;
ctx["name"] = name();
ctx["type"] = type();
ctx["scope"] = to_string(scope());
return ctx;
}
}

View File

@@ -18,12 +18,16 @@
#pragma once
#include "common/model/decorated_element.h"
#include "common/model/source_location.h"
#include <inja/inja.hpp>
#include <string>
namespace clanguml::class_diagram::model {
class class_element : public common::model::decorated_element {
class class_element : public common::model::decorated_element,
public common::model::source_location {
public:
class_element(common::model::scope_t scope, const std::string &name,
const std::string &type);
@@ -32,6 +36,8 @@ public:
std::string name() const;
std::string type() const;
virtual inja::json context() const;
private:
common::model::scope_t scope_;
std::string name_;