Skip to content

Commit

Permalink
Adapt doxyapp and doxyparse
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Apr 28, 2024
1 parent e2af21e commit 0b8e537
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions addon/doxyapp/doxyapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "filename.h"
#include "version.h"

class XRefDummyCodeGenerator : public OutputCodeExtension
class XRefDummyCodeGenerator : public OutputCodeIntf
{
public:
XRefDummyCodeGenerator(FileDef *fd) : m_fd(fd) {}
Expand All @@ -52,6 +52,7 @@ class XRefDummyCodeGenerator : public OutputCodeExtension
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
OutputType type() const override { return OutputType::Extension; }
std::unique_ptr<OutputCodeIntf> clone() override { return std::make_unique<XRefDummyCodeGenerator>(m_fd); }
void codify(const QCString &) override {}
void writeCodeLink(CodeSymbolType,const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
void writeLineNumber(const QCString &,const QCString &,const QCString &,int,bool) override {}
Expand Down Expand Up @@ -123,9 +124,9 @@ static void findXRefSymbols(FileDef *fd)
intf->resetCodeParserState();

// create a new backend object
XRefDummyCodeGenerator xrefGen(fd);
std::unique_ptr<OutputCodeIntf> xrefGen = std::make_unique<XRefDummyCodeGenerator>(fd);
OutputCodeList xrefList;
xrefList.add(OutputCodeDeferExtension(&xrefGen));
xrefList.add(std::move(xrefGen));

// parse the source code
intf->parseCode(xrefList,
Expand Down
7 changes: 4 additions & 3 deletions addon/doxyparse/doxyparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "portable.h"
#include "dir.h"

class Doxyparse : public OutputCodeExtension
class Doxyparse : public OutputCodeIntf
{
public:
Doxyparse(const FileDef *fd) : m_fd(fd) {}
Expand All @@ -55,6 +55,7 @@ class Doxyparse : public OutputCodeExtension
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
OutputType type() const override { return OutputType::Extension; }
std::unique_ptr<OutputCodeIntf> clone() override { return std::make_unique<Doxyparse>(m_fd); }
void codify(const QCString &) override {}
void writeCodeLink(CodeSymbolType,const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
void startCodeLine(int) override {}
Expand Down Expand Up @@ -99,9 +100,9 @@ static void findXRefSymbols(FileDef *fd)
intf->resetCodeParserState();

// create a new backend object
Doxyparse parse(fd);
std::unique_ptr<OutputCodeIntf> parse = std::make_unique<Doxyparse>(fd);
OutputCodeList parseList;
parseList.add(OutputCodeDeferExtension(&parse));
parseList.add(std::move(parse));

// parse the source code
intf->parseCode(parseList, QCString(), fileToString(fd->absFilePath()), lang, FALSE, QCString(), fd);
Expand Down

0 comments on commit 0b8e537

Please sign in to comment.