Include diagram MermaidJS generator. More...
Include diagram MermaidJS generator.
Definition at line 51 of file include_diagram_generator.h.
#include <include_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 source_file &p, std::ostream &ostr) const |
Generate relationships originating from source_file f | |
void | generate (const source_file &e, std::ostream &ostr) const |
Generate diagram element. | |
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 Member Functions | |
void | generate_with_packages (const source_file &f, std::ostream &ostr) const |
void | generate_without_packages (const source_file &f, std::ostream &ostr) const |
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::include_diagram::generators::mermaid::generator::generator | ( | diagram_config & | config, |
diagram_model & | model | ||
) |
Definition at line 27 of file include_diagram_generator.cc.
void clanguml::include_diagram::generators::mermaid::generator::generate | ( | const source_file & | e, |
std::ostream & | ostr | ||
) | const |
Generate diagram element.
e | Source file diagram element |
parent | Output stream |
Definition at line 62 of file include_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 125 of file include_diagram_generator.cc.
|
overridevirtual |
Generate the diagram type.
ostr | Output stream |
Implements clanguml::common::generators::mermaid::generator< ConfigType, DiagramType >.
Definition at line 32 of file include_diagram_generator.cc.
void clanguml::include_diagram::generators::mermaid::generator::generate_relationships | ( | const source_file & | p, |
std::ostream & | ostr | ||
) | const |
Generate relationships originating from source_file f
p | Diagram element |
parent | Output stream |
Definition at line 37 of file include_diagram_generator.cc.
|
private |
Definition at line 72 of file include_diagram_generator.cc.
|
private |
Definition at line 102 of file include_diagram_generator.cc.