Base class for all diagram models. More...
#include <diagram.h>
Public Member Functions | |
diagram () | |
diagram (const diagram &)=delete | |
diagram (diagram &&) noexcept | |
diagram & | operator= (const diagram &)=delete |
diagram & | operator= (diagram &&) noexcept |
virtual | ~diagram () |
virtual diagram_t | type () const =0 |
Return type of the diagram. | |
virtual opt_ref< clanguml::common::model::diagram_element > | get (const std::string &full_name) const =0 |
virtual common::optional_ref< clanguml::common::model::diagram_element > | get (eid_t id) const =0 |
virtual common::optional_ref< clanguml::common::model::diagram_element > | get_with_namespace (const std::string &name, const namespace_ &ns) const |
void | set_name (const std::string &name) |
std::string | name () const |
void | set_filter (std::unique_ptr< diagram_filter > filter) |
const diagram_filter & | filter () const |
void | set_complete (bool complete) |
Set diagram in a complete state. | |
bool | complete () const |
Whether the diagram is complete. | |
virtual void | finalize () |
Once the diagram is complete, run any final processing. | |
bool | should_include (const element &e) const |
bool | should_include (const namespace_ &ns) const |
bool | should_include (const source_file &path) const |
bool | should_include (relationship r) const |
bool | should_include (relationship_t r) const |
bool | should_include (access_t s) const |
bool | should_include (const std::string &s) const =delete |
virtual bool | has_element (const eid_t) const |
virtual bool | should_include (const namespace_ &ns, const std::string &name) const |
virtual bool | is_empty () const =0 |
Check whether the diagram is empty. | |
virtual void | apply_filter () |
Private Attributes | |
std::string | name_ |
std::unique_ptr< diagram_filter > | filter_ |
bool | complete_ {false} |
bool | filtered_ {false} |
|
default |
|
delete |
|
defaultnoexcept |
|
virtualdefault |
|
inlinevirtual |
Reimplemented in clanguml::class_diagram::model::diagram, clanguml::include_diagram::model::diagram, and clanguml::package_diagram::model::diagram.
Definition at line 167 of file diagram.h.
bool clanguml::common::model::diagram::complete | ( | ) | const |
Whether the diagram is complete.
This flag is set to true, when all translation units for this diagram have been visited.
Definition at line 60 of file diagram.cc.
|
inline |
|
virtual |
Once the diagram is complete, run any final processing.
This method should be overriden by specific diagram models to do some final tasks like cleaning up the model (e.g. some filters only work on completed diagrams).
Reimplemented in clanguml::sequence_diagram::model::diagram.
Definition at line 62 of file diagram.cc.
|
pure virtual |
Return optional reference to a diagram_element by name.
full_name | Fully qualified name of a diagram element. |
Implemented in clanguml::class_diagram::model::diagram, clanguml::include_diagram::model::diagram, clanguml::package_diagram::model::diagram, and clanguml::sequence_diagram::model::diagram.
|
pure virtual |
Return optional reference to a diagram_element by id.
id | Id of a diagram element. |
Implemented in clanguml::include_diagram::model::diagram, clanguml::package_diagram::model::diagram, and clanguml::sequence_diagram::model::diagram.
|
virtual |
Return optional reference to a diagram_element by name and namespace.
name | Name of the diagram element (e.g. a class name) |
ns | Namespace of the element. |
Reimplemented in clanguml::include_diagram::model::diagram.
Definition at line 35 of file diagram.cc.
|
inlinevirtual |
|
pure virtual |
Check whether the diagram is empty.
Implemented in clanguml::class_diagram::model::diagram, clanguml::include_diagram::model::diagram, clanguml::package_diagram::model::diagram, and clanguml::sequence_diagram::model::diagram.
std::string clanguml::common::model::diagram::name | ( | ) | const |
Return the name of the diagram.
Definition at line 49 of file diagram.cc.
void clanguml::common::model::diagram::set_complete | ( | bool | complete | ) |
Set diagram in a complete state.
This must be called after the diagram's 'translation_unit_visitor' has completed for all translation units, in order to apply filters which can only work after the diagram is complete.
complete | Status of diagram visitor completion. |
Definition at line 58 of file diagram.cc.
void clanguml::common::model::diagram::set_filter | ( | std::unique_ptr< diagram_filter > | filter | ) |
Set diagram filter for this diagram.
filter | diagram_filter instance |
Definition at line 53 of file diagram.cc.
void clanguml::common::model::diagram::set_name | ( | const std::string & | name | ) |
bool clanguml::common::model::diagram::should_include | ( | access_t | s | ) | const |
Definition at line 116 of file diagram.cc.
bool clanguml::common::model::diagram::should_include | ( | const element & | e | ) | const |
Definition at line 69 of file diagram.cc.
bool clanguml::common::model::diagram::should_include | ( | const namespace_ & | ns | ) | const |
Definition at line 92 of file diagram.cc.
|
virtual |
Definition at line 124 of file diagram.cc.
bool clanguml::common::model::diagram::should_include | ( | const source_file & | path | ) | const |
Definition at line 133 of file diagram.cc.
|
delete |
bool clanguml::common::model::diagram::should_include | ( | relationship | r | ) | const |
Definition at line 103 of file diagram.cc.
bool clanguml::common::model::diagram::should_include | ( | relationship_t | r | ) | const |
Definition at line 108 of file diagram.cc.
|
pure virtual |
Return type of the diagram.
Implemented in clanguml::class_diagram::model::diagram, clanguml::include_diagram::model::diagram, clanguml::package_diagram::model::diagram, and clanguml::sequence_diagram::model::diagram.
|
private |
|
private |
|
private |
|
private |