Class diagram PlantUML generator. More...
Class diagram PlantUML generator.
Definition at line 70 of file class_diagram_generator.h.
#include <class_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_link (std::ostream &ostr, const class_element &e) const |
Generate a hyperlink for a class element. | |
void | generate_alias (const class_ &c, std::ostream &ostr) const |
Generate PlantUML alias for a class element. | |
void | generate_alias (const enum_ &e, std::ostream &ostr) const |
Generate PlantUML alias for a enum element. | |
void | generate_alias (const concept_ &c, std::ostream &ostr) const |
Generate PlantUML alias for a concept element. | |
void | generate (const class_ &c, std::ostream &ostr) const |
Render class element to PlantUML. | |
void | generate (const objc_interface &c, std::ostream &ostr) const |
void | generate_alias (const objc_interface &c, std::ostream &ostr) const |
void | generate_methods (const std::vector< class_method > &methods, std::ostream &ostr) const |
Render class methods to PlantUML. | |
void | start_method_group (std::ostream &ostr) const |
void | generate_method (const class_method &m, std::ostream &ostr) const |
Render class method to PlantUML. | |
void | generate_member (const class_member &m, std::ostream &ostr) const |
Render class member to PlantUML. | |
void | generate_relationships (const class_ &c, std::ostream &ostr) const |
Render all relationships originating from class element. | |
void | generate_relationship (const relationship &r, std::set< std::string > &rendered_relations) const |
Render a specific relationship to PlantUML. | |
void | generate (const enum_ &e, std::ostream &ostr) const |
Render enum element to PlantUML. | |
void | generate_relationships (const enum_ &c, std::ostream &ostr) const |
Render all relationships originating from enum element. | |
void | generate (const concept_ &c, std::ostream &ostr) const |
Render concept element to PlantUML. | |
void | generate_relationships (const concept_ &c, std::ostream &ostr) const |
Render all relationships originating from concept element. | |
void | generate (const package &p, std::ostream &ostr) const |
Render package element to PlantUML. | |
void | generate_member_notes (std::ostream &ostream, const class_element &member, const std::string &alias) const |
Generate any notes attached specifically to some class element. | |
void | generate_member (const objc_member &m, std::ostream &ostr) const |
void | generate_method (const objc_method &m, std::ostream &ostr) const |
void | generate_methods (const std::vector< objc_method > &methods, std::ostream &ostr) const |
void | generate_relationships (const objc_interface &c, std::ostream &ostr) const |
void | start_together_group (const std::string &group_name, std::ostream &ostr) const |
void | end_together_group (const std::string &group_name, std::ostream &ostr) const |
void | start_package (const package &p, std::ostream &ostr) const |
void | end_package (const package &p, std::ostream &ostr) const |
Public Member Functions inherited from clanguml::common::generators::plantuml::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_config_layout_hints (std::ostream &ostr) const |
Generate diagram layout hints. | |
void | generate_plantuml_directives (std::ostream &ostr, const std::vector< std::string > &directives) const |
Generate PlantUML directives from config file. | |
void | generate_notes (std::ostream &ostr, const model::element &element) const |
Generate diagram notes. | |
void | generate_style (std::ostream &ostr, const std::string &element_type, const model::stylable_element &el) const |
Generate diagram element PlantUML style. | |
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 | generate_link (std::ostream &ostr, const relationship &e) const |
generate_link specialization for relationship | |
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 |
Public Member Functions inherited from clanguml::class_diagram::generators::text_diagram_strategy< generator > | |
text_diagram_strategy (generator &generator, bool generate_packages) | |
void | generate (const package &p, std::ostream &ostr) const |
void | generate_top_level_elements (std::ostream &ostr) const |
void | generate_relationships (const package &p, std::ostream &ostr) const |
void | generate_relationships (std::ostream &ostr) const |
void | generate_groups (std::ostream &ostr) const |
void | sort_class_elements (std::vector< T > &elements) const |
void | generate_method_groups (const method_groups_t &methods, std::ostream &ostr) const |
method_groups_t | group_methods (const std::vector< model::class_method > &methods) const |
Group class methods based on method type. | |
Additional Inherited Members | |
Public Types inherited from clanguml::class_diagram::generators::text_diagram_strategy< generator > | |
using | method_groups_t = std::map< std::string, std::vector< model::class_method > > |
Protected Attributes inherited from clanguml::common::generators::plantuml::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::class_diagram::generators::plantuml::generator::generator | ( | diagram_config & | config, |
diagram_model & | model | ||
) |
Definition at line 29 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::end_package | ( | const package & | p, |
std::ostream & | ostr | ||
) | const |
Definition at line 892 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::end_together_group | ( | const std::string & | group_name, |
std::ostream & | ostr | ||
) | const |
Definition at line 906 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate | ( | const class_ & | c, |
std::ostream & | ostr | ||
) | const |
Render class element to PlantUML.
c | Class element |
ostr | Output stream |
Definition at line 151 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate | ( | const concept_ & | c, |
std::ostream & | ostr | ||
) | const |
Render concept element to PlantUML.
c | Concept element |
ostr | Output stream |
Definition at line 352 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate | ( | const enum_ & | e, |
std::ostream & | ostr | ||
) | const |
Render enum element to PlantUML.
e | Enum element |
ostr | Output stream |
Definition at line 731 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate | ( | const objc_interface & | c, |
std::ostream & | ostr | ||
) | const |
Definition at line 384 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate | ( | const package & | p, |
std::ostream & | ostr | ||
) | const |
Render package element to PlantUML.
p | Package element |
ostr | Output stream |
void clanguml::class_diagram::generators::plantuml::generator::generate_alias | ( | const class_ & | c, |
std::ostream & | ostr | ||
) | const |
Generate PlantUML alias for a class element.
c | Class element |
ostr | Output stream |
Definition at line 71 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_alias | ( | const concept_ & | c, |
std::ostream & | ostr | ||
) | const |
Generate PlantUML alias for a concept element.
c | Concept element |
ostr | Output stream |
Definition at line 118 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_alias | ( | const enum_ & | e, |
std::ostream & | ostr | ||
) | const |
Generate PlantUML alias for a enum element.
e | Enum element |
ostr | Output stream |
Definition at line 103 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_alias | ( | const objc_interface & | c, |
std::ostream & | ostr | ||
) | const |
Definition at line 133 of file class_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::plantuml::generator< ConfigType, DiagramType >.
Definition at line 912 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_link | ( | std::ostream & | ostr, |
const class_element & | e | ||
) | const |
Generate a hyperlink for a class element.
ostr | Output stream |
e | Class element (e.g. a method) |
Definition at line 36 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_member | ( | const class_member & | m, |
std::ostream & | ostr | ||
) | const |
Render class member to PlantUML.
m | Class member |
ostr | Output stream |
Definition at line 331 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_member | ( | const objc_member & | m, |
std::ostream & | ostr | ||
) | const |
Definition at line 507 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_member_notes | ( | std::ostream & | ostream, |
const class_element & | member, | ||
const std::string & | alias | ||
) | const |
Generate any notes attached specifically to some class element.
ostream | Output stream |
member | Class element (member or method) |
alias | PlantUML class alias |
Definition at line 528 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_method | ( | const class_method & | m, |
std::ostream & | ostr | ||
) | const |
Render class method to PlantUML.
m | Class method |
ostr | Output stream |
Definition at line 257 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_method | ( | const objc_method & | m, |
std::ostream & | ostr | ||
) | const |
Definition at line 464 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_methods | ( | const std::vector< class_method > & | methods, |
std::ostream & | ostr | ||
) | const |
Render class methods to PlantUML.
methods | List of class methods |
ostr | Output stream |
Definition at line 233 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_methods | ( | const std::vector< objc_method > & | methods, |
std::ostream & | ostr | ||
) | const |
Definition at line 245 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_relationship | ( | const relationship & | r, |
std::set< std::string > & | rendered_relations | ||
) | const |
Render a specific relationship to PlantUML.
r | Relationship model |
rendered_relations | Set of already rendered relationships, to ensure that there are no duplicate relationships |
Definition at line 542 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_relationships | ( | const class_ & | c, |
std::ostream & | ostr | ||
) | const |
Render all relationships originating from class element.
c | Class element |
ostr | Output stream |
Definition at line 575 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_relationships | ( | const concept_ & | c, |
std::ostream & | ostr | ||
) | const |
Render all relationships originating from concept element.
c | Concept element |
ostr | Output stream |
Definition at line 654 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_relationships | ( | const enum_ & | c, |
std::ostream & | ostr | ||
) | const |
Render all relationships originating from enum element.
c | Enum element |
ostr | Output stream |
Definition at line 752 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::generate_relationships | ( | const objc_interface & | c, |
std::ostream & | ostr | ||
) | const |
Definition at line 793 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::start_method_group | ( | std::ostream & | ostr | ) | const |
Definition at line 231 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::start_package | ( | const package & | p, |
std::ostream & | ostr | ||
) | const |
Definition at line 872 of file class_diagram_generator.cc.
void clanguml::class_diagram::generators::plantuml::generator::start_together_group | ( | const std::string & | group_name, |
std::ostream & | ostr | ||
) | const |
Definition at line 900 of file class_diagram_generator.cc.