22Q_DECLARE_TR_FUNCTIONS(Generator);
25 enum class ClobberMode {
31 Generator(
const smithy::Model *
const model,
Renderer *
const renderer);
33 int expectedFileCount()
const;
35 bool generate(
const QString &outputDir, ClobberMode clobberMode);
37 QStringList renderedFiles()
const;
38 QStringList skippedFiles()
const;
41 enum class Capitalisation {
49 bool renderService(
const smithy::Shape &service,
50 const QStringList &serviceTemplateNames,
51 const QStringList &operationTemplateNames,
52 const QString &outputDir, ClobberMode &clobberMode);
54 bool renderOperation(
const smithy::Shape &operation,
const QVariantHash serviceContext,
55 const QStringList &templateNames,
const QString &outputDir,
56 ClobberMode &clobberMode);
58 bool render(
const QString &templateName,
const QString &outputPathName,
59 ClobberMode &clobberMode);
61 QVariantHash toContext(
const smithy::Shape &shape)
const;
63 static const QString canonicalServiceId(
const QString &sdkId);
65 static bool promptToOverwrite(
const QString &pathName, ClobberMode &clobberMode);
67 static Capitalisation getCase(
const QString &first,
const QString &second);
68 static QString makeCase(
const QString &
string,
const Capitalisation &capitalisation);
69 static QString makeOutputPathName(
const QString &templateName,
const QRegularExpression &pattern,
70 const QHash<QString,QString> &ids,
71 const QString &outputDir = QString{});
76 const smithy::Model *
const model;
78 QStringList renderedPathNames;
79 QStringList skippedPathNames;
81 static const QRegularExpression servicePattern;
82 static const QRegularExpression operationPattern;