diff options
Diffstat (limited to 'src/outputlist.cpp')
-rw-r--r-- | src/outputlist.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/outputlist.cpp b/src/outputlist.cpp index e942465..3e05dac 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -30,19 +30,35 @@ #include "docparser.h" #include "vhdldocgen.h" -OutputList::OutputList(bool) + +OutputList::OutputList() { //printf("OutputList::OutputList()\n"); } -OutputList::~OutputList() +OutputList::OutputList(const OutputList &ol) { - //printf("OutputList::~OutputList()\n"); + for (const auto &og : ol.m_outputs) + { + m_outputs.emplace_back(og->clone()); + } +} + +OutputList &OutputList::operator=(const OutputList &ol) +{ + if (this!=&ol) + { + for (const auto &og : ol.m_outputs) + { + m_outputs.emplace_back(og->clone()); + } + } + return *this; } -void OutputList::add(OutputGenerator *og) +OutputList::~OutputList() { - if (og) m_outputs.emplace_back(og); + //printf("OutputList::~OutputList()\n"); } void OutputList::disableAllBut(OutputGenerator::OutputType o) |