Documented ExportBase.

This commit is contained in:
tastytea 2019-07-27 22:29:43 +02:00
parent b3bb1f05f2
commit 514f88b0eb
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 16 additions and 1 deletions

View File

@ -32,16 +32,31 @@ namespace Export
class ExportBase
{
public:
/*!
* @brief Export vector of Database::entry.
*
* @param entries Vector of Database::entry to export.
* @param out Output stream.
*/
explicit ExportBase(const vector<Database::entry> &entries,
ostream &out = cout);
/*!
* @brief Print output to std::ostream.
*/
virtual void print() const = 0;
protected:
const vector<Database::entry> _entries;
ostream &_out;
//! Sort entries from newest to oldest.
/*!
* @brief Sort entries from newest to oldest.
*
* @param entries Vector of Database::entry to sort.
*
* @return Sorted vector of Database::entry.
*/
const vector<Database::entry>
sort_entries(vector<Database::entry> entries) const;
};