Smithy Qt 0.1.0-pre
Smithy code generator for Qt
|
The Model class provides a Qt representation of a Smithy semantic model. More...
Public Types | |
enum class | Error { NoError = 0 , NoData = 1 , InvalidMetadata = 2 , InvalidShapes = 3 , InvalidShapeId = 4 , InvalidShape = 5 , ConflictingMetadata = 6 } |
Public Member Functions | |
Model () | |
Constructs a new, empty Smithy model. | |
Model (Model &&other) | |
Model (const Model &other) | |
Model & | operator= (const Model &model) |
Model & | operator= (const Model &&model) |
~Model () | |
Destroys this Model object. | |
void | clear () |
bool | insert (const QJsonObject &ast) |
Add the logical content of the JSON AST model file given by ast into this semantic model. | |
bool | finish () |
Error | error () const |
bool | isValid () const |
QJsonObject | metadata () const |
Shape | shape (const ShapeId &shapeId) const |
QHash< ShapeId, Shape > | shapes (const Shape::Type &type=Shape::Type::Undefined) const |
The Model class provides a Qt representation of a Smithy semantic model.
Model::Model | ( | ) |
Constructs a new, empty Smithy model.
bool Model::finish | ( | ) |
bool Model::insert | ( | const QJsonObject & | ast | ) |
Add the logical content of the JSON AST model file given by ast into this semantic model.
A Smithy semantic model is split into one or more model files. Use this method to add all model files that comprise this semantic model.
QHash< ShapeId, Shape > Model::shapes | ( | const Shape::Type & | type = Shape::Type::Undefined | ) | const |