Include diagram JSON generator. More...
Include diagram JSON 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 (nlohmann::json &parent) const override |
Main generator method. | |
void | generate_relationships (const source_file &f, nlohmann::json &parent) const |
Generate relationships originating from source_file f | |
void | generate (const source_file &e, nlohmann::json &parent) const |
Generate diagram element. | |
Public Member Functions inherited from clanguml::common::generators::json::generator< ConfigType, DiagramType > | |
~generator () override=default | |
void | generate (std::ostream &ostr) const override |
Generate diagram. | |
virtual void | generate_diagram (nlohmann::json &parent) const =0 |
Generate diagram model. | |
void | generate_metadata (nlohmann::json &parent) const |
Generate metadata element with diagram metadata. | |
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, nlohmann::json &parent) const |
void | generate_without_packages (const source_file &f, nlohmann::json &parent) const |
Additional Inherited Members | |
Protected Attributes inherited from clanguml::common::generators::generator< ConfigType, DiagramType > | |
inja::json | m_context |
inja::Environment | m_env |
clanguml::include_diagram::generators::json::generator::generator | ( | diagram_config & | config, |
diagram_model & | model | ||
) |
Definition at line 25 of file include_diagram_generator.cc.
void clanguml::include_diagram::generators::json::generator::generate | ( | const source_file & | e, |
nlohmann::json & | parent | ||
) | const |
Generate diagram element.
e | Source file diagram element |
parent | Parent JSON node |
Definition at line 50 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::json::generator< ConfigType, DiagramType >.
Definition at line 126 of file include_diagram_generator.cc.
void clanguml::include_diagram::generators::json::generator::generate_relationships | ( | const source_file & | f, |
nlohmann::json & | parent | ||
) | const |
Generate relationships originating from source_file f
p | Diagram element |
parent | JSON node |
Definition at line 30 of file include_diagram_generator.cc.
|
private |
Definition at line 60 of file include_diagram_generator.cc.
|
private |
Definition at line 96 of file include_diagram_generator.cc.