diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2000-02-15 20:03:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2000-02-15 20:03:34 (GMT) |
commit | 397fa609f53790f008f33d8ce4e6e26bce3c1279 (patch) | |
tree | 50b1099761af52d0ca94caec83c8ff3a08efb753 /src/outputgen.cpp | |
parent | 19119105076ca1b361b11b49df61050879c1e054 (diff) | |
download | Doxygen-397fa609f53790f008f33d8ce4e6e26bce3c1279.zip Doxygen-397fa609f53790f008f33d8ce4e6e26bce3c1279.tar.gz Doxygen-397fa609f53790f008f33d8ce4e6e26bce3c1279.tar.bz2 |
Upgrade to 1.1.0
Diffstat (limited to 'src/outputgen.cpp')
-rw-r--r-- | src/outputgen.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 3496aad..5e176b8 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * $Id$ * - * Copyright (C) 1997-1999 by Dimitri van Heesch. + * Copyright (C) 1997-2000 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 @@ -28,12 +28,15 @@ OutputGenerator::OutputGenerator() b.open( IO_WriteOnly ); t.setDevice(&b); active=TRUE; + genStack = new QStack<bool>; + genStack->setAutoDelete(TRUE); } OutputGenerator::~OutputGenerator() { //printf("OutputGenerator::~OutputGenerator()\n"); delete file; + delete genStack; } void OutputGenerator::startPlainFile(const char *name) @@ -76,3 +79,15 @@ QCString OutputGenerator::getContents() const return s; } +void OutputGenerator::pushGeneratorState() +{ + genStack->push(new bool(isEnabled())); +} + +void OutputGenerator::popGeneratorState() +{ + bool *b = genStack->pop(); + ASSERT(b!=0); + if (b==0) return; // for some robustness against superfluous \endhtmlonly commands. + if (*b) enable(); else disable(); +} |