diff options
Diffstat (limited to 'src/outputlist.h')
-rw-r--r-- | src/outputlist.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/outputlist.h b/src/outputlist.h index 9393a59..003e508 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -37,11 +37,18 @@ class DocRoot; class OutputList : public OutputDocInterface { public: - OutputList(bool); + OutputList(); + OutputList(const OutputList &ol); + OutputList &operator=(const OutputList &ol); virtual ~OutputList(); - void add(OutputGenerator *); - uint count() const { return static_cast<uint>(m_outputs.size()); } + template<class Generator> + void add() + { + m_outputs.emplace_back(std::make_unique<Generator>()); + } + + size_t size() const { return m_outputs.size(); } void disableAllBut(OutputGenerator::OutputType o); void enableAll(); @@ -493,8 +500,8 @@ class OutputList : public OutputDocInterface } } - OutputList(const OutputList &ol); std::vector< std::unique_ptr<OutputGenerator> > m_outputs; + }; #endif |