Added debug_mode config option
This commit is contained in:
@@ -124,6 +124,14 @@ public:
|
||||
template <typename E>
|
||||
void generate_link(std::ostream &ostr, const E &e) const;
|
||||
|
||||
/**
|
||||
* @brief Print debug information in diagram comments
|
||||
*
|
||||
* @param m Diagram element to describe
|
||||
* @param ostr Output stream
|
||||
*/
|
||||
void print_debug(
|
||||
const common::model::source_location &e, std::ostream &ostr) const;
|
||||
/**
|
||||
* @brief Update diagram Jinja context
|
||||
*
|
||||
@@ -345,6 +353,14 @@ void generator<C, D>::generate_link(std::ostream &ostr, const E &e) const
|
||||
ostr << "]]";
|
||||
}
|
||||
|
||||
template <typename C, typename D>
|
||||
void generator<C, D>::print_debug(
|
||||
const common::model::source_location &e, std::ostream &ostr) const
|
||||
{
|
||||
if (m_config.debug_mode())
|
||||
ostr << "' " << e.file() << ":" << e.line() << '\n';
|
||||
}
|
||||
|
||||
template <typename DiagramModel, typename DiagramConfig,
|
||||
typename TranslationUnitVisitor>
|
||||
class diagram_ast_consumer : public clang::ASTConsumer {
|
||||
|
||||
Reference in New Issue
Block a user