summaryrefslogtreecommitdiffstats
path: root/src/htmlgen.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-09-27 18:26:20 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-09-27 18:26:20 (GMT)
commitcfdabb54c5bcea38629eb0ec8f207d1306ff0939 (patch)
treecb323c258fe80e0e2422f939d40af66eefdd055e /src/htmlgen.h
parent55e15c86717f38c9b510e4287cb0b4f165b8cb10 (diff)
downloadDoxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.zip
Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.gz
Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.bz2
Refactoring: prepare output generators for multi-threaded use
Diffstat (limited to 'src/htmlgen.h')
-rw-r--r--src/htmlgen.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 9487e60..ff77fe7 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -21,11 +19,6 @@
#include "outputgen.h"
#include "ftextstream.h"
-//#define PREFRAG_START "<div class=\"fragment\"><pre class=\"fragment\">"
-//#define PREFRAG_END "</pre></div>"
-#define PREFRAG_START "<div class=\"fragment\">"
-#define PREFRAG_END "</div><!-- fragment -->"
-
class QFile;
class HtmlCodeGenerator : public CodeOutputInterface
@@ -54,6 +47,8 @@ class HtmlCodeGenerator : public CodeOutputInterface
void writeCodeAnchor(const char *anchor);
void setCurrentDoc(const Definition *,const char *,bool) {}
void addWord(const char *,bool) {}
+ void startCodeFragment(const char *style);
+ void endCodeFragment();
private:
void _writeCodeLink(const char *className,
@@ -61,10 +56,11 @@ class HtmlCodeGenerator : public CodeOutputInterface
const char *anchor,const char *name,
const char *tooltip);
void docify(const char *str);
- bool m_streamSet;
+ bool m_streamSet = false;
FTextStream m_t;
- int m_col;
+ int m_col = 0;
QCString m_relPath;
+ bool m_lineOpen = false;
};
/** Generator for HTML output */
@@ -113,6 +109,10 @@ class HtmlGenerator : public OutputGenerator
{ m_codeGen.endFontClass(); }
void writeCodeAnchor(const char *anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
+ void startCodeFragment(const char *style)
+ { m_codeGen.startCodeFragment(style); }
+ void endCodeFragment()
+ { m_codeGen.endCodeFragment(); }
// ---------------------------
void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile);
@@ -208,8 +208,6 @@ class HtmlGenerator : public OutputGenerator
void writeRuler() { t << "<hr/>"; }
void writeAnchor(const char *,const char *name)
{ t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }
- void startCodeFragment();
- void endCodeFragment();
void startEmphasis() { t << "<em>"; }
void endEmphasis() { t << "</em>"; }
void startBold() { t << "<b>"; }