Package diagram MermaidJS generator. More...
Package diagram MermaidJS generator.
Definition at line 53 of file package_diagram_generator.h.
#include <package_diagram_generator.h>
Public Member Functions | |
generator (diagram_config &config, diagram_model &model) | |
void | generate_diagram (std::ostream &ostr) const override |
Main generator method. | |
void | generate_diagram_type (std::ostream &ostr) const override |
Generate the diagram type. | |
void | generate_relationships (const package &p, std::ostream &ostr) const |
Generate relationships originating from package p | |
void | generate (const package &e, std::ostream &ostr) const |
Generate diagram package element. | |
void | generate_groups (std::ostream &ostr) const |
Generate package elements grouped using together MermaidJS tag. | |
void | generate_notes (std::ostream &ostr, const common::model::diagram_element &element) const override |
Generate notes attached to packages. | |
Public Member Functions inherited from clanguml::common::generators::mermaid::generator< ConfigType, DiagramType > | |
generator (ConfigType &config, DiagramType &model) | |
Constructor. | |
~generator () override=default | |
void | generate (std::ostream &ostr) const override |
Generate diagram. | |
virtual void | generate_diagram (std::ostream &ostr) const =0 |
Generate diagram specific part. | |
void | generate_mermaid_directives (std::ostream &ostr, const std::vector< std::string > &directives) const |
Generate MermaidJS directives from config file. | |
virtual void | generate_diagram_type (std::ostream &ostr) const =0 |
Generate the diagram type. | |
virtual void | generate_notes (std::ostream &ostr, const model::diagram_element &element) const |
Generate diagram notes. | |
void | generate_metadata (std::ostream &ostr) const |
Generate comment with diagram metadata. | |
void | generate_title (std::ostream &ostr) const |
Generate diagram title. | |
template<typename E > | |
void | generate_link (std::ostream &ostr, const E &e) const |
Generate hyper link to element. | |
void | print_debug (const common::model::source_location &e, std::ostream &ostr) const |
Print debug information in diagram comments. | |
Public Member Functions inherited from clanguml::common::generators::generator< ConfigType, DiagramType > | |
generator (ConfigType &config, DiagramType &model) | |
Constructor. | |
virtual | ~generator ()=default |
virtual void | generate (std::ostream &ostr) const =0 |
Generate diagram. | |
const ConfigType & | config () const |
Get reference to diagram config. | |
const DiagramType & | model () const |
Get reference to diagram model. | |
std::optional< std::pair< std::string, std::string > > | get_link_pattern (const common::model::source_location &sl) const |
std::optional< std::pair< std::string, std::string > > | get_tooltip_pattern (const common::model::source_location &sl) const |
std::optional< std::string > | render_link (const common::model::diagram_element &e) const |
std::optional< std::string > | render_link (const common::model::relationship &e) const |
std::optional< std::string > | render_tooltip (const common::model::diagram_element &e) const |
std::optional< std::string > | render_tooltip (const common::model::relationship &e) const |
void | init_context () |
Initialize diagram Jinja context. | |
void | update_context () const |
Update diagram Jinja context. | |
void | init_env () |
const inja::json & | context () const |
inja::Environment & | env () const |
Private Attributes | |
uint64_t | note_id_ {0UL} |
common::generators::nested_element_stack< common::model::package > | together_group_stack_ |
Additional Inherited Members | |
Protected Attributes inherited from clanguml::common::generators::mermaid::generator< ConfigType, DiagramType > | |
std::set< std::string > | m_generated_aliases |
Protected Attributes inherited from clanguml::common::generators::generator< ConfigType, DiagramType > | |
inja::json | m_context |
inja::Environment | m_env |
clanguml::package_diagram::generators::mermaid::generator::generator | ( | diagram_config & | config, |
diagram_model & | model | ||
) |
Definition at line 28 of file package_diagram_generator.cc.
void clanguml::package_diagram::generators::mermaid::generator::generate | ( | const package & | e, |
std::ostream & | ostr | ||
) | const |
Generate diagram package element.
p | Package diagram element |
parent | Output stream |
Definition at line 76 of file package_diagram_generator.cc.
|
overridevirtual |
Main generator method.
This method is called first and coordinates the entire diagram generation.
ostr | Output stream. |
Implements clanguml::common::generators::mermaid::generator< ConfigType, DiagramType >.
Definition at line 155 of file package_diagram_generator.cc.
|
overridevirtual |
Generate the diagram type.
ostr | Output stream |
Implements clanguml::common::generators::mermaid::generator< ConfigType, DiagramType >.
Definition at line 34 of file package_diagram_generator.cc.
void clanguml::package_diagram::generators::mermaid::generator::generate_groups | ( | std::ostream & | ostr | ) | const |
Generate package elements grouped using together
MermaidJS tag.
ostr | Output stream |
Definition at line 122 of file package_diagram_generator.cc.
|
overridevirtual |
Generate notes attached to packages.
ostr | Output stream |
element | Element with a note |
Reimplemented from clanguml::common::generators::mermaid::generator< ConfigType, DiagramType >.
Definition at line 136 of file package_diagram_generator.cc.
void clanguml::package_diagram::generators::mermaid::generator::generate_relationships | ( | const package & | p, |
std::ostream & | ostr | ||
) | const |
Generate relationships originating from package p
p | Diagram element |
parent | Output stream |
Definition at line 39 of file package_diagram_generator.cc.
|
mutableprivate |
Definition at line 109 of file package_diagram_generator.h.
|
mutableprivate |
Definition at line 111 of file package_diagram_generator.h.