Fixed package diagram generation
This commit is contained in:
@@ -34,14 +34,19 @@ class relationship;
|
||||
class diagram {
|
||||
public:
|
||||
diagram();
|
||||
|
||||
virtual ~diagram();
|
||||
|
||||
virtual diagram_t type() const = 0;
|
||||
|
||||
virtual std::optional<
|
||||
std::reference_wrapper<const clanguml::common::model::diagram_element>>
|
||||
std::reference_wrapper<clanguml::common::model::diagram_element>>
|
||||
get(const std::string &full_name) const = 0;
|
||||
|
||||
virtual std::optional<
|
||||
std::reference_wrapper<clanguml::common::model::diagram_element>>
|
||||
get(const diagram_element::id_t id) const = 0;
|
||||
|
||||
diagram(const diagram &) = delete;
|
||||
diagram(diagram &&);
|
||||
diagram &operator=(const diagram &) = delete;
|
||||
@@ -62,6 +67,7 @@ public:
|
||||
bool should_include(const relationship r) const;
|
||||
bool should_include(const relationship_t r) const;
|
||||
bool should_include(const access_t s) const;
|
||||
|
||||
virtual bool has_element(const diagram_element::id_t id) const
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -63,14 +63,14 @@ const clanguml::common::optional_ref<class_diagram::model::class_> get(
|
||||
}
|
||||
|
||||
template <>
|
||||
const clanguml::common::optional_ref<const common::model::package> get(
|
||||
const clanguml::common::optional_ref<common::model::package> get(
|
||||
const package_diagram::model::diagram &d, const std::string &full_name)
|
||||
{
|
||||
return d.get_package(full_name);
|
||||
}
|
||||
|
||||
template <>
|
||||
const clanguml::common::optional_ref<const common::model::source_file> get(
|
||||
const clanguml::common::optional_ref<common::model::source_file> get(
|
||||
const include_diagram::model::diagram &d, const std::string &full_name)
|
||||
{
|
||||
return d.get_file(full_name);
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace clanguml::common {
|
||||
using id_t = int64_t;
|
||||
|
||||
template <typename T>
|
||||
using optional_ref = std::optional<std::reference_wrapper<const T>>;
|
||||
using optional_ref = std::optional<std::reference_wrapper<T>>;
|
||||
|
||||
template <typename T>
|
||||
using reference_vector = std::vector<std::reference_wrapper<const T>>;
|
||||
using reference_vector = std::vector<std::reference_wrapper<T>>;
|
||||
|
||||
template <typename T>
|
||||
using reference_set = std::unordered_set<std::reference_wrapper<const T>>;
|
||||
|
||||
Reference in New Issue
Block a user