Add conversion for backwards links
[dueringa_WikiWalker.git] / inc / DataOutputBase.h
blob7e75f24b24d6192e9ccd2b523cc54c2113aa8c5d
1 //! \file DataOutputBase.h
3 #ifndef WIKIWALKER_ADATAOUTPUT_H
4 #define WIKIWALKER_ADATAOUTPUT_H
6 #include <ostream>
8 #include "ArticleCollection.h"
10 namespace WikiWalker
12 /*! Abstract base class for output modules.
13 * Child classes are responsible for converting the article structure
14 * to other formats.
16 class DataOutputBase
18 public:
19 /*! Output an article to an outstream.
20 * \param a pointer to article to be output
21 * \param os out stream to putput to.
22 * YOU are responsible for opening and closing the stream
24 /*! \todo pass reference instead? or weak_ptr? or shared_ptr?
25 * I have no idea... */
26 virtual void output(const Article* a, std::ostream& os) = 0;
28 /*! Output an article collection to an outstream.
29 * \param ac reference to article collection to be output
30 * \param os out stream to putput to
31 * YOU are responsible for opening and closing the stream
33 virtual void output(const CollectionUtils::ArticleCollection& ac,
34 std::ostream& os) = 0;
36 //! virtual base class d'tor
37 virtual ~DataOutputBase() = default;
39 } // namespace WikiWalker
40 #endif // WIKIWALKER_ADATAOUTPUT_H