@@ -30,22 +30,23 @@ class DotInclDepGraph;
30
30
class DotGfxHierarchyTable ;
31
31
class DotGroupCollaboration ;
32
32
33
- class OutputCodeList : public CodeOutputInterface
33
+ class OutputCodeList
34
34
{
35
35
public:
36
36
OutputCodeList () = default ;
37
37
virtual ~OutputCodeList () = default ;
38
38
39
- OutputType type () const override { return OutputType::List; }
39
+ OutputType type () const { return OutputType::List; }
40
40
41
+ /* * Identifier for the output file */
41
42
void add (CodeOutputInterface *codeGen)
42
43
{
43
44
m_outputCodeList.push_back (codeGen);
44
45
}
45
- void setId (int id) override
46
+ virtual int id () const { return m_id; }
47
+ void setId (int id)
46
48
{
47
- CodeOutputInterface::setId (id);
48
- forall (&CodeOutputInterface::setId,id);
49
+ m_id = id;
49
50
}
50
51
void setEnabledFiltered (OutputType o,bool enabled)
51
52
{
@@ -57,32 +58,32 @@ class OutputCodeList : public CodeOutputInterface
57
58
58
59
// ---- CodeOutputInterface forwarding
59
60
60
- void codify (const QCString &s) override
61
+ void codify (const QCString &s)
61
62
{ forall (&CodeOutputInterface::codify,s); }
62
63
void writeCodeLink (CodeSymbolType type,
63
64
const QCString &ref,const QCString &file,
64
65
const QCString &anchor,const QCString &name,
65
- const QCString &tooltip) override
66
+ const QCString &tooltip)
66
67
{ forall (&CodeOutputInterface::writeCodeLink,type,ref,file,anchor,name,tooltip); }
67
68
void writeLineNumber (const QCString &ref,const QCString &file,const QCString &anchor,
68
- int lineNumber, bool writeLineAnchor) override
69
+ int lineNumber, bool writeLineAnchor)
69
70
{ forall (&CodeOutputInterface::writeLineNumber,ref,file,anchor,lineNumber,writeLineAnchor); }
70
71
void writeTooltip (const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
71
- const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo) override
72
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
72
73
{ forall (&CodeOutputInterface::writeTooltip,id,docInfo,decl,desc,defInfo,declInfo); }
73
- void startCodeLine (bool hasLineNumbers) override
74
+ void startCodeLine (bool hasLineNumbers)
74
75
{ forall (&CodeOutputInterface::startCodeLine,hasLineNumbers); }
75
- void endCodeLine () override
76
+ void endCodeLine ()
76
77
{ forall (&CodeOutputInterface::endCodeLine); }
77
- void startFontClass (const QCString &c) override
78
+ void startFontClass (const QCString &c)
78
79
{ forall (&CodeOutputInterface::startFontClass,c); }
79
- void endFontClass () override
80
+ void endFontClass ()
80
81
{ forall (&CodeOutputInterface::endFontClass); }
81
- void writeCodeAnchor (const QCString &name) override
82
+ void writeCodeAnchor (const QCString &name)
82
83
{ forall (&CodeOutputInterface::writeCodeAnchor,name); }
83
- void startCodeFragment (const QCString &style) override
84
+ void startCodeFragment (const QCString &style)
84
85
{ forall (&CodeOutputInterface::startCodeFragment,style); }
85
- void endCodeFragment (const QCString &style) override
86
+ void endCodeFragment (const QCString &style)
86
87
{ forall (&CodeOutputInterface::endCodeFragment,style); }
87
88
88
89
private:
@@ -95,6 +96,7 @@ class OutputCodeList : public CodeOutputInterface
95
96
}
96
97
}
97
98
std::vector< CodeOutputInterface* > m_outputCodeList;
99
+ int m_id = -1 ;
98
100
};
99
101
100
102
/* * Class representing a list of output generators that are written to
@@ -112,8 +114,8 @@ class OutputList
112
114
void add ()
113
115
{
114
116
auto docGen = std::make_unique<DocGenerator>();
115
- docGen->codeGen ()->setId (m_id);
116
117
m_codeGenList.add (docGen->codeGen ());
118
+ m_codeGenList.setId (m_id);
117
119
m_outputs.emplace_back (std::move (docGen));
118
120
}
119
121
@@ -140,7 +142,7 @@ class OutputList
140
142
bool indexWords,bool isExample,const QCString &exampleName /* =0*/ ,
141
143
bool singleLine /* =FALSE*/ ,bool linkFromIndex /* =FALSE*/ ,
142
144
bool markdownSupport /* =FALSE*/ );
143
- void writeDoc (const IDocNodeAST *ast,const Definition *ctx,const MemberDef *md, int id= 0 );
145
+ void writeDoc (const IDocNodeAST *ast,const Definition *ctx,const MemberDef *md);
144
146
void parseText (const QCString &textStr);
145
147
void startFile (const QCString &name,const QCString &manName,const QCString &title);
146
148
0 commit comments