summaryrefslogtreecommitdiffstats
path: root/src/docbookgen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/docbookgen.h')
-rw-r--r--src/docbookgen.h53
1 files changed, 23 insertions, 30 deletions
diff --git a/src/docbookgen.h b/src/docbookgen.h
index bed2f5f..0fefe4b 100644
--- a/src/docbookgen.h
+++ b/src/docbookgen.h
@@ -1,6 +1,6 @@
/******************************************************************************
*
-*
+*
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
@@ -15,6 +15,7 @@
#ifndef DOCBOOKGEN_H
#define DOCBOOKGEN_H
+#include "config.h"
#include "outputgen.h"
class DocbookCodeGenerator : public CodeOutputInterface
@@ -57,16 +58,16 @@ class DocbookCodeGenerator : public CodeOutputInterface
private:
FTextStream m_t;
- bool m_streamSet = FALSE;
+ bool m_streamSet = false;
QCString m_refId;
QCString m_external;
int m_lineNumber = -1;
int m_col = 0;
- bool m_insideCodeLine = FALSE;
- bool m_insideSpecialHL = FALSE;
+ bool m_insideCodeLine = false;
+ bool m_insideSpecialHL = false;
QCString m_relPath;
QCString m_sourceFileName;
- bool m_prettyCode = FALSE;
+ bool m_prettyCode = Config_getBool(DOCBOOK_PROGRAMLISTING);
};
@@ -97,20 +98,14 @@ class DocbookGenerator : public OutputGenerator
{
public:
DocbookGenerator();
- ~DocbookGenerator();
+ DocbookGenerator(const DocbookGenerator &o);
+ DocbookGenerator &operator=(const DocbookGenerator &o);
+ virtual ~DocbookGenerator();
+ virtual std::unique_ptr<OutputGenerator> clone() const;
+
static void init();
- ///////////////////////////////////////////////////////////////
- // generic generator methods
- ///////////////////////////////////////////////////////////////
- void enable()
- { if (m_genStack->top()) m_active=*m_genStack->top(); else m_active=TRUE; }
- void disable() { m_active=FALSE; }
- void enableIf(OutputType o) { if (o==Docbook) enable(); }
- void disableIf(OutputType o) { if (o==Docbook) disable(); }
- void disableIfNot(OutputType o) { if (o!=Docbook) disable(); }
- bool isEnabled(OutputType o) { return (o==Docbook && m_active); }
- OutputGenerator *get(OutputType o) { return (o==Docbook) ? this : 0; }
+ OutputType type() const { return Docbook; }
// --- CodeOutputInterface
void codify(const char *text)
@@ -343,21 +338,19 @@ class DocbookGenerator : public OutputGenerator
void addWord(const char *,bool) {DB_GEN_EMPTY}
private:
- DocbookGenerator(const DocbookGenerator &o);
- DocbookGenerator &operator=(const DocbookGenerator &o);
-
+
QCString relPath;
DocbookCodeGenerator m_codeGen;
- bool m_prettyCode;
- bool m_denseText;
- bool m_inGroup;
- bool m_inDetail;
- int m_levelListItem;
- bool m_inListItem[20];
- bool m_inSimpleSect[20];
- bool m_descTable;
- int m_inLevel;
- bool m_firstMember;
+ bool m_prettyCode = Config_getBool(DOCBOOK_PROGRAMLISTING);
+ bool m_denseText = false;
+ bool m_inGroup = false;
+ bool m_inDetail = false;
+ int m_levelListItem = 0;
+ bool m_inListItem[20] = { false, };
+ bool m_inSimpleSect[20] = { false, };
+ bool m_descTable = false;
+ int m_inLevel = -1;
+ bool m_firstMember = false;
};
#endif