Added 'title' diagram property
This commit is contained in:
@@ -131,6 +131,16 @@ public:
|
||||
*/
|
||||
void generate_metadata(std::ostream &ostr) const;
|
||||
|
||||
/**
|
||||
* @brief Generate diagram title
|
||||
*
|
||||
* Generates a PlantUML diagram title directive if diagram title
|
||||
* is provided in the diagram configuration.
|
||||
*
|
||||
* @param ostr Output stream
|
||||
*/
|
||||
void generate_title(std::ostream &ostr) const;
|
||||
|
||||
/**
|
||||
* @brief Generate hyper link to element
|
||||
*
|
||||
@@ -241,6 +251,8 @@ void generator<C, D>::generate(std::ostream &ostr) const
|
||||
|
||||
ostr << "@startuml" << '\n';
|
||||
|
||||
generate_title(ostr);
|
||||
|
||||
generate_plantuml_directives(ostr, config.puml().before);
|
||||
|
||||
generate_diagram(ostr);
|
||||
@@ -449,6 +461,16 @@ void generator<C, D>::generate_metadata(std::ostream &ostr) const
|
||||
}
|
||||
}
|
||||
|
||||
template <typename C, typename D>
|
||||
void generator<C, D>::generate_title(std::ostream &ostr) const
|
||||
{
|
||||
const auto &config = generators::generator<C, D>::config();
|
||||
|
||||
if (config.title) {
|
||||
ostr << "title " << config.title() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
template <typename C, typename D>
|
||||
template <typename E>
|
||||
void generator<C, D>::generate_link(std::ostream &ostr, const E &e) const
|
||||
|
||||
Reference in New Issue
Block a user