Smithy Qt 0.1.0-pre
Internal development documentation
Loading...
Searching...
No Matches
Generator Class Reference
Collaboration diagram for Generator:
[legend]

Public Types

enum class  ClobberMode { Prompt , Overwrite , Skip }
 

Public Member Functions

 Generator (const smithy::Model *const model, Renderer *const renderer)
 
int expectedFileCount () const
 
bool generate (const QString &outputDir, ClobberMode clobberMode)
 
QStringList renderedFiles () const
 
QStringList skippedFiles () const
 

Protected Types

enum class  Capitalisation {
  NoChange = 0 , lowercase = 1 , camelCase = 2 , CamelCase = 3 ,
  UPPERCASE = 4
}
 

Protected Member Functions

bool renderService (const smithy::Shape &service, const QStringList &serviceTemplateNames, const QStringList &operationTemplateNames, const QString &outputDir, ClobberMode &clobberMode)
 
bool renderOperation (const smithy::Shape &operation, const QVariantHash serviceContext, const QStringList &templateNames, const QString &outputDir, ClobberMode &clobberMode)
 
bool render (const QString &templateName, const QString &outputPathName, ClobberMode &clobberMode)
 
QVariantHash toContext (const smithy::Shape &shape) const
 

Static Protected Member Functions

static const QString canonicalServiceId (const QString &sdkId)
 
static bool promptToOverwrite (const QString &pathName, ClobberMode &clobberMode)
 
static Capitalisation getCase (const QString &first, const QString &second)
 
static QString makeCase (const QString &string, const Capitalisation &capitalisation)
 
static QString makeOutputPathName (const QString &templateName, const QRegularExpression &pattern, const QHash< QString, QString > &ids, const QString &outputDir=QString{})
 
static QStringList formatHtmlDocumentation (const QString &html)
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (Generator)
 

Static Private Member Functions

static Q_LOGGING_CATEGORY (lc, "smithy.Generator", QtInfoMsg)
 Logging category for Generator.
 

Private Attributes

const smithy::Model *const model
 
Renderer *const renderer
 
QStringList renderedPathNames
 
QStringList skippedPathNames
 

Static Private Attributes

static const QRegularExpression servicePattern
 
static const QRegularExpression operationPattern
 

Detailed Description

Definition at line 20 of file generator.h.

Member Enumeration Documentation

◆ Capitalisation

enum class Generator::Capitalisation
strongprotected

Definition at line 41 of file generator.h.

41 {
42 NoChange = 0,
43 lowercase = 1,
44 camelCase = 2,
45 CamelCase = 3,
46 UPPERCASE = 4,
47 };

◆ ClobberMode

enum class Generator::ClobberMode
strong

Definition at line 25 of file generator.h.

25 {
26 Prompt,
27 Overwrite,
28 Skip,
29 };

Constructor & Destructor Documentation

◆ Generator()

Generator::Generator ( const smithy::Model *const model,
Renderer *const renderer )

Definition at line 43 of file generator.cpp.

44 : model(model), renderer(renderer)
45{
46 Q_ASSERT(model->isValid());
47 Q_ASSERT(renderer);
48}

Member Function Documentation

◆ canonicalServiceId()

const QString Generator::canonicalServiceId ( const QString & sdkId)
staticprotected

Definition at line 295 of file generator.cpp.

296{
297 // Handle some hard-coded special cases that are hard to automate without a dictionary.
298 const QMap<QString,QString> specialCases{
299 { QSL("identitystore" ), QSL("IdentityStore") },
300 { QSL("ivschat" ), QSL("IvsChat") },
301 { QSL("forecastquery" ), QSL("ForecastQuery") },
302 { QSL("resiliencehub" ), QSL("ResilienceHub") },
303 { QSL("savingsplans" ), QSL("SavingsPlans") },
304 { QSL("codeartifact" ), QSL("CodeArtifact") },
305 { QSL("imagebuilder" ), QSL("ImageBuilder") },
306 { QSL("billingconductor"), QSL("BillingConductor") },
307 };
308 for (const auto iter = specialCases.constFind(sdkId); iter != specialCases.constEnd(); ) {
309 return iter.value();
310 }
311
312 // Start with the sdkId.
313 QString id = sdkId;
314
315 // Convert runs of upercase letters with first-upper, and the rest lower.
316 auto iter = QRegularExpression(QSL("[A-Z]{2,}([^a-zA-Z]|$)")).globalMatch(id);
317 while (iter.hasNext()) {
318 const auto match = iter.next();
319 id.replace(match.capturedStart()+1, match.capturedLength()-1,
320 match.captured().mid(1).toLower());
321 }
322
323 // If the sdkId was all lowercase, then uppercase the first letter of each word.
324 #if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
325 if (id == id.toLower()) {
326 #else
327 if (id.isLower()) { // QString::isLower() added in Qt 5.12.
328 #endif
329 const QStringList words = id.split(QRegularExpression(QSL("[^a-zA-Z0-9]+")));
330 id.clear();
331 for (const QString &word: words) {
332 id.append(word.at(0).toUpper() + word.mid(1));
333 }
334 }
335
336 // Strip all non-alphanumeric characters, and any instances of "Amazon" and "AWS".
337 id.replace(QRegularExpression(QSL("[^a-zA-Z0-9]|Amazon|AWS"),
338 QRegularExpression::PatternOption::CaseInsensitiveOption),QString());
339
340 // Remove any trailing instances of "API", "Client" and "Service".
341 if (id == QSL("ConfigService")) return id; // Skip dropping the Service for this one.
342 if (id == QSL("DirectoryService")) return id; // Skip dropping the Service for this one.
343 id.replace(QRegularExpression(QSL("(API|Client|Service)$"),
344 QRegularExpression::PatternOption::CaseInsensitiveOption),QString());
345 return id;
346}

◆ expectedFileCount()

int Generator::expectedFileCount ( ) const

Definition at line 51 of file generator.cpp.

52{
53 const QHash<smithy::ShapeId, smithy::Shape> services = model->shapes(smithy::Shape::Type::Service);
54 const int operations = std::accumulate(services.constBegin(), services.constEnd(), 0,
55 [](const int a, const smithy::Shape &shape) { return a + shape.operations().size();
56 });
57 const QStringList templates = renderer->templatesNames();
58 return std::accumulate(templates.constBegin(), templates.constEnd(), 0,
59 [&](const int a, const QString &name) {
60 return a + (servicePattern.match(name).hasMatch() ?
61 (operationPattern.match(name).hasMatch() ? operations : services.size()) : 1);
62 });
63}

◆ formatHtmlDocumentation()

QStringList Generator::formatHtmlDocumentation ( const QString & html)
staticprotected
Todo
This is often dropping the last word of a sentence... won't fix yet so we can maintain the old aws-sdk-qt codegen behaviour until the swithover to smithy-qt templating is complete (ie to minimise the initial change-over diff).
Todo
There's much more we can do here, indeed the documentation conversation still needs a lot of love. But its a start, and no point prioritising it yet, since its more important we get the code structure right first.

Definition at line 459 of file generator.cpp.

460{
461 QString content(html);
462
463 /// @todo There's much more we can do here, indeed the documentation
464 /// conversation still needs a lot of love. But its a start, and no point
465 /// prioritising it yet, since its more important we get the code structure
466 /// right first.
467
468 content.replace(QSL("<function>"), QSL("<code>"));
469 content.replace(QSL("</function>"), QSL("</code>"));
470
471 content.replace(QSL("<important>"), QSL("<b>"));
472 content.replace(QSL("</important>"), QSL("</b>"));
473
474 // Replace /* and */ with &ast; versions to avoid breaking comment blocks.
475 content.replace(QSL("/*"), QSL("/&ast;"));
476 content.replace(QSL("*/"), QSL("&ast;/"));
477
478 QStringList lines;
479 QString line;
480 #if (QT_VERSION > QT_VERSION_CHECK(5, 14, 0))
481 #define SKIP_EMPTY_PARTS Qt::SkipEmptyParts // Introduced in Qt 5.14.
482 #else
483 #define SKIP_EMPTY_PARTS QString::SkipEmptyParts // Deprecated in Qt 5.15.
484 #endif
485 for (QString word: content.split(QRegularExpression(QSL("\\s+")), SKIP_EMPTY_PARTS)) {
486 if (word.startsWith(QSL("<p>")) || word.endsWith(QSL("</p>"))) {
487 lines.append(line);
488 line.clear();
489 if (!lines.last().isEmpty()) {
490 lines.append(QString()); // A blank line.
491 }
492 if (word.startsWith(QSL("<p>"))) {
493 word.remove(0,3);
494 }
495 if (word.endsWith(QSL("</p>"))) {
496 word.remove(word.size()-5,4);
497 }
498 }
499
500 if (line.isEmpty()) {
501 line += word;
502 } else if (line.size() + word.size() < 120) {
503 line += QLatin1Char(' ') + word;
504 } else {
505 lines.append(line);
506 line = word;
507 }
508 }
509
510 // Remove leading and trailing blank lines.
511 while ((!lines.isEmpty()) && (lines.first().isEmpty())) {
512 lines.removeFirst();
513 }
514 while ((!lines.isEmpty()) && (lines.last().isEmpty())) {
515 lines.removeLast();
516 }
517 return lines;
518}

◆ generate()

bool Generator::generate ( const QString & outputDir,
ClobberMode clobberMode )

Definition at line 65 of file generator.cpp.

66{
67 // Add initial context.
68 QVariantMap servicesMap;
69 const QHash<smithy::ShapeId, smithy::Shape> services = model->shapes(smithy::Shape::Type::Service);
70 for (const smithy::Shape &service: services) {
71 servicesMap.insert(service.id().toString(), toContext(service));
72 }
73 const ScopedContext context(renderer, { { QSL("services"), servicesMap } });
74
75 // Build the list of template names.
76 const QStringList templatesNames = renderer->templatesNames();
77 QStringList serviceTemplateNames, operationTemplateNames, plainTemplateNames;
78 for (const QString &name: templatesNames) {
79 ((servicePattern.match(name).hasMatch()) ? (operationPattern.match(name).hasMatch() ?
80 operationTemplateNames : serviceTemplateNames) : plainTemplateNames).append(name);
81 }
82 Q_ASSERT(serviceTemplateNames.size() + operationTemplateNames.size()
83 + plainTemplateNames.size() == templatesNames.size());
84
85 // Render all of the services.
86 if (!std::all_of(services.constBegin(), services.constEnd(), [&](const smithy::Shape &service) {
87 return renderService(service, serviceTemplateNames, operationTemplateNames, outputDir, clobberMode);
88 })) {
89 return false;
90 }
91
92 // Render all of the one-off (not per-service) files.
93 qCDebug(lc).noquote() << tr("Rendering %n unary template/s", nullptr, plainTemplateNames.size());
94 return std::all_of(plainTemplateNames.constBegin(), plainTemplateNames.constEnd(),
95 [&](const QString &templateName){
96 const QString outputPathName = outputDir + QLatin1Char('/') + templateName;
97 return render(templateName, outputPathName, clobberMode);
98 });
99}

◆ getCase()

Generator::Capitalisation Generator::getCase ( const QString & first,
const QString & second )
staticprotected

Definition at line 379 of file generator.cpp.

380{
381 #if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
382 if ((first == first.toLower()) && (second == second.toLower())) {
383 #else
384 if (first.isLower() && second.isLower()) {
385 #endif
386 return Capitalisation::lowercase;
387 }
388 #if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
389 if ((first == first.toUpper()) && (second == second.toUpper())) {
390 #else
391 if (first.isUpper() && second.isUpper()) {
392 #endif
393 return Capitalisation::UPPERCASE;
394 }
395 #if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
396 if ((first.at(0) == first.at(0).toLower()) && (second.at(0) == second.at(0).toUpper())) {
397 #else
398 if (first.front().isLower() && second.front().isUpper()) {
399 #endif
400 return Capitalisation::camelCase;
401 }
402 #if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
403 if ((first.at(0) == first.at(0).isUpper()) && (second.at(0) == second.at(0).toLower())) {
404 #else
405 if (first.front().isUpper() && second.front().isUpper()) {
406 #endif
407 return Capitalisation::CamelCase;
408 }
409 return Capitalisation::NoChange;
410}

◆ makeCase()

QString Generator::makeCase ( const QString & string,
const Capitalisation & capitalisation )
staticprotected

Definition at line 412 of file generator.cpp.

413{
414 switch (capitalisation) {
415 case Capitalisation::NoChange:
416 return string;
417 case Capitalisation::lowercase:
418 return string.toLower();
419 case Capitalisation::camelCase:
420 Q_UNIMPLEMENTED();
421 break;
422 case Capitalisation::CamelCase:
423 Q_UNIMPLEMENTED();
424 break;
425 case Capitalisation::UPPERCASE:
426 return string.toUpper();
427 }
428 qCCritical(lc).noquote() << tr("Unknown capitalisation %1 for %2")
429 .arg((int)capitalisation).arg(string);
430 return QString{};
431}

◆ makeOutputPathName()

QString Generator::makeOutputPathName ( const QString & templateName,
const QRegularExpression & pattern,
const QHash< QString, QString > & ids,
const QString & outputDir = QString{} )
staticprotected

Definition at line 433 of file generator.cpp.

435{
436 QString outputPathName = templateName;
437 for (auto iter = pattern.globalMatch(templateName); iter.hasNext(); ) {
438 const QRegularExpressionMatch match = iter.next();
439 const QString type = match.captured(QSL("type"));
440 const QString sep = match.captured(QSL("separator"));
441 const QString id = match.captured(QSL("id"));
442 const QString newId = ids.value(id.toLower());
443 if (newId.isNull()) {
444 qCCritical(lc).noquote() << tr("No pathname ID value for %1").arg(id);
445 return QString{};
446 }
447 const QString label = makeCase(newId, getCase(type, id)).replace(QLatin1Char(' '), sep);
448 outputPathName.replace(type+sep+id, label);
449 }
450 if (!outputDir.isEmpty()) {
451 outputPathName.prepend(outputDir + QLatin1Char('/'));
452 }
453 return outputPathName;
454}

◆ promptToOverwrite()

bool Generator::promptToOverwrite ( const QString & pathName,
ClobberMode & clobberMode )
staticprotected

Definition at line 348 of file generator.cpp.

349{
350 Q_ASSERT(clobberMode == ClobberMode::Prompt);
351 while (true) {
352 qCWarning(lc).noquote() << tr("Overwrite %1 [y,n,a,s,q,?]? ").arg(pathName);
353 QTextStream stream(stdin);
354 const QString response = stream.readLine().toLower();
355 if (response == QSL("y")) {
356 return true;
357 } else if (response == QSL("n")) {
358 return false;
359 } else if (response == QSL("a")) {
360 clobberMode = ClobberMode::Overwrite;
361 return true;
362 } else if (response == QSL("s")) {
363 clobberMode = ClobberMode::Skip;
364 return false;
365 } else if (response == QSL("q")) {
366 QCoreApplication::exit(EXIT_FAILURE);
367 } else {
368 qCInfo(lc).noquote() << tr("y - overwrite this file");
369 qCInfo(lc).noquote() << tr("n - do not overwrite this file");
370 qCInfo(lc).noquote() << tr("a - overwrite this, and all remaining files");
371 qCInfo(lc).noquote() << tr("s - do not overwrite this, or any remaining files");
372 qCInfo(lc).noquote() << tr("q - quit now, without writing any further files");
373 qCInfo(lc).noquote() << tr("? - print help");
374 }
375 }
376 Q_UNREACHABLE();
377}

◆ render()

bool Generator::render ( const QString & templateName,
const QString & outputPathName,
ClobberMode & clobberMode )
protected

Definition at line 176 of file generator.cpp.

178{
179 if (QFile::exists(outputPathName)) {
180 switch (clobberMode) {
181 case ClobberMode::Overwrite:
182 qCDebug(lc) << tr("Overwriting existing file: %1").arg(outputPathName);
183 break;
184 case ClobberMode::Prompt:
185 if (promptToOverwrite(outputPathName, clobberMode)) {
186 break; // User said yes, so jump out of case statement.
187 }
188 __attribute__((fallthrough));
189 case ClobberMode::Skip:
190 qCDebug(lc) << tr("Skipping existing output file: %1").arg(outputPathName);
191 skippedPathNames.append(outputPathName);
192 return true;
193 }
194 }
195 if (!renderer->render(templateName, outputPathName)) {
196 return false;
197 }
198 renderedPathNames.append(outputPathName);
199 return true;
200}

◆ renderedFiles()

QStringList Generator::renderedFiles ( ) const

Definition at line 101 of file generator.cpp.

102{
103 return renderedPathNames;
104}

◆ renderOperation()

bool Generator::renderOperation ( const smithy::Shape & operation,
const QVariantHash serviceContext,
const QStringList & templateNames,
const QString & outputDir,
ClobberMode & clobberMode )
protected

Definition at line 151 of file generator.cpp.

154{
155 qCDebug(lc).noquote() << tr("Rendering templates for operation %1").arg(operation.id().toString());
156
157 // Add renderer context for this operation.
158 // cppcheck-suppress unreadVariable
159 const ScopedContext context(renderer, { { QSL("operation"), toContext(operation) } });
160 for (const QString &templateName: templateNames) {
161 QString outputPathName = makeOutputPathName(templateName, servicePattern, {
162 { QSL("name"), serviceContext.value(QSL("shapeName")).toString() },
163 { QSL("id"), serviceContext.value(QSL("canonicalId")).toString() },
164 { QSL("sdkid"), serviceContext.value(QSL("sdkId")).toString() },
165 });
166 outputPathName = makeOutputPathName(outputPathName, operationPattern, {
167 { QSL("name"), operation.id().shapeName() },
168 }, outputDir);
169 if (!render(templateName, outputPathName, clobberMode)) {
170 return false;
171 }
172 }
173 return true;
174}

◆ renderService()

bool Generator::renderService ( const smithy::Shape & service,
const QStringList & serviceTemplateNames,
const QStringList & operationTemplateNames,
const QString & outputDir,
ClobberMode & clobberMode )
protected

Definition at line 111 of file generator.cpp.

115{
116 qCDebug(lc).noquote() << tr("Rendering templates for service %1").arg(service.id().toString());
117
118 // Add renderer context for this service.
119 const QVariantHash serviceContext = toContext(service);
120 // cppcheck-suppress unreadVariable
121 const ScopedContext context(renderer, { { QSL("service"), serviceContext } });
122
123 // Render each service template.
124 for (const QString &templateName: serviceTemplateNames) {
125 const QString outputPathName = makeOutputPathName(templateName, servicePattern, {
126 { QSL("name"), service.id().shapeName() },
127 { QSL("id"), serviceContext.value(QSL("canonicalId")).toString() },
128 { QSL("sdkid"), serviceContext.value(QSL("sdkId")).toString() },
129 }, outputDir);
130 if (!render(templateName, outputPathName, clobberMode)) {
131 return false;
132 }
133 }
134
135 // Render each of the service's operation.
136 const QVariantMap operations = serviceContext.value(QSL("operations")).toMap();
137 for (auto iter = operations.constBegin(); iter != operations.constEnd(); ++iter) {
138 const smithy::Shape operation = model->shape(iter->toHash().value(QSL("shapeId")).toString());
139 if (!operation.isValid()) {
140 qCCritical(lc).noquote() << tr("Failed to find shape for %1 operation in %2 service")
141 .arg(iter.key(), service.id().toString());
142 return false;
143 }
144 if (!renderOperation(operation, serviceContext, operationTemplateNames, outputDir, clobberMode)) {
145 return false;
146 }
147 }
148 return true;
149}

◆ skippedFiles()

QStringList Generator::skippedFiles ( ) const

Definition at line 106 of file generator.cpp.

107{
108 return skippedPathNames;
109}

◆ toContext()

QVariantHash Generator::toContext ( const smithy::Shape & shape) const
protected

Definition at line 203 of file generator.cpp.

204{
205 if (shape.type() == smithy::Shape::Type::Service) {
206 QVariantHash hash = shape.rawAst().toVariantHash();
207 hash.insert(QSL("shapeName"), shape.id().shapeName());
208 hash.insert(QSL("canonicalId"), canonicalServiceId(shape.traits()
209 .value(QSL("aws.api#service")).toObject().value(QSL("sdkId")).toString()));
210 hash.insert(QSL("sdkId"), shape.traits().value(QSL("aws.api#service")).toObject()
211 .value(QSL("sdkId")).toString());
212 hash.insert(QSL("documentation"), formatHtmlDocumentation(
213 shape.traits().value(QSL("smithy.api#documentation")).toString()));
214 QVariantMap operations;
215 const smithy::Shape::ShapeReferences operationRefs = shape.operations();
216 for (const smithy::Shape::ShapeReference &operationRef: operationRefs) {
217 operations.insert(operationRef.target.shapeName(),
218 toContext(model->shape(operationRef.target)));
219 }
220 Q_ASSERT(operationRefs.size() == operations.size());
221 const smithy::Shape::ShapeReferences resourceRefs = shape.resources();
222 for (const smithy::Shape::ShapeReference &resourceRef: resourceRefs) {
223 const QVariantHash resourceContext = toContext(model->shape(resourceRef.target));
224 // resourceContext will contain the raw AST, and probably other things too over time,
225 // but for now (to replicate historical aws-sdk-qt codegen behaviour) we just want to
226 // add the resource operations to the service operations list.
227 const QVariantMap resourceOperations = resourceContext.value(QSL("operations")).toMap();
228 for (auto iter = resourceOperations.constBegin(); iter != resourceOperations.constEnd(); ++iter) {
229 operations.insert(iter.key(), iter.value());
230 }
231 }
232 hash.insert(QSL("operations"), operations);
233 return hash;
234 }
235
236 if (shape.type() == smithy::Shape::Type::Operation) {
237 QVariantHash hash = shape.rawAst().toVariantHash();
238 hash.insert(QSL("name"), shape.id().shapeName());
239 hash.insert(QSL("shapeId"), shape.id().toString());
240 hash.insert(QSL("documentation"), formatHtmlDocumentation(
241 shape.traits().value(QSL("smithy.api#documentation")).toString()));
242 return hash;
243 }
244
245 if (shape.type() == smithy::Shape::Type::Resource) {
246 QVariantHash hash = shape.rawAst().toVariantHash();
247 QVariantMap operations;
248 #define QTSMITHY_IF_VALID_INSERT(action) { \
249 const smithy::ShapeId action##TargetId = shape.action().target; \
250 if (action##TargetId.isValid()) { \
251 operations.insert(action##TargetId.shapeName(), \
252 toContext(model->shape(action##TargetId))); \
253 } \
254 }
255 QTSMITHY_IF_VALID_INSERT(create)
256 QTSMITHY_IF_VALID_INSERT(put)
257 QTSMITHY_IF_VALID_INSERT(read)
258 QTSMITHY_IF_VALID_INSERT(update)
259 QTSMITHY_IF_VALID_INSERT(Delete)
260 QTSMITHY_IF_VALID_INSERT(list)
261 #undef QTSMITHY_IF_VALID_INSERT
262
263 #define QTSMITHY_ADD_SHAPES(property) { \
264 const smithy::Shape::ShapeReferences refs = shape.property(); \
265 for (const smithy::Shape::ShapeReference &ref: refs) { \
266 operations.insert(ref.target.shapeName(), toContext(model->shape(ref.target))); \
267 } \
268 }
269 QTSMITHY_ADD_SHAPES(operations)
270 QTSMITHY_ADD_SHAPES(collectionOperations)
271 #undef QTSMITHY_ADD_SHAPES
272
273 const smithy::Shape::ShapeReferences resourceRefs = shape.resources();
274 for (const smithy::Shape::ShapeReference &resourceRef: resourceRefs) {
275 const QVariantHash resourceContext = toContext(model->shape(resourceRef.target));
276 // resourceContext will contain the raw AST, and probably other things too over time,
277 // but for now (to replicate historical aws-sdk-qt codegen behaviour) we just want to
278 // add the resource operations to the service operations list.
279 const QVariantMap resourceOperations = resourceContext.value(QSL("operations")).toMap();
280 for (auto iter = resourceOperations.constBegin(); iter != resourceOperations.constEnd(); ++iter) {
281 operations.insert(iter.key(), iter.value());
282 }
283 }
284
285 hash.insert(QSL("operations"), operations);
286 return hash;
287 }
288
289 qCCritical(lc).noquote() << tr("Cannot generate context for shape type 0x%1")
290 .arg((int)shape.type(), 0, 16);
291 return QVariantHash{};
292}
static QStringList formatHtmlDocumentation(const QString &html)

Member Data Documentation

◆ model

const smithy::Model* const Generator::model
private

Definition at line 76 of file generator.h.

◆ operationPattern

const QRegularExpression Generator::operationPattern
staticprivate
Initial value:
{
QSL("(?<type>Operation)(?<seperator>[^a-zA-Z0-9]*)(?<id>Name)"),
QRegularExpression::CaseInsensitiveOption
}

Definition at line 38 of file generator.h.

40 :
41 enum class Capitalisation {

◆ renderedPathNames

QStringList Generator::renderedPathNames
private

Definition at line 78 of file generator.h.

◆ renderer

Renderer* const Generator::renderer
private

Definition at line 77 of file generator.h.

◆ servicePattern

const QRegularExpression Generator::servicePattern
staticprivate
Initial value:
{
QSL("(?<type>Service)(?<seperator>[^a-zA-Z0-9]*)(?<id>Title|Id|sdkId)"),
QRegularExpression::CaseInsensitiveOption
}

Definition at line 33 of file generator.h.

◆ skippedPathNames

QStringList Generator::skippedPathNames
private

Definition at line 79 of file generator.h.


The documentation for this class was generated from the following files: