Initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#ifndef GENERATOR_INTERFACE_H
|
||||
#define GENERATOR_INTERFACE_H
|
||||
|
||||
#include "repository_result.h"
|
||||
#include <QString>
|
||||
|
||||
class GeneratorInterface {
|
||||
public:
|
||||
using ShouldLogSuccess = std::function<bool()>;
|
||||
|
||||
public:
|
||||
inline virtual ~GeneratorInterface() noexcept = default;
|
||||
|
||||
virtual void generateAll(const ShouldLogSuccess &shouldLogSuccess) = 0;
|
||||
virtual void
|
||||
generateByFillRatio(double fillRatio,
|
||||
const ShouldLogSuccess &shouldLogSuccess) = 0;
|
||||
virtual void
|
||||
generateByRecordCount(qint64 totalRecordsToCreate,
|
||||
const ShouldLogSuccess &shouldLogSuccess) = 0;
|
||||
|
||||
protected: // Const methods
|
||||
virtual QString createFailureMessage(const QString &errorMessage) const = 0;
|
||||
virtual QString createSuccessMessage() const = 0;
|
||||
virtual QString createTemplateMessage() const = 0;
|
||||
virtual qsizetype calculateRemainingCapacity() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user