Skip to content

[C++] [Qt5] Export valid and set status of properties #6020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ void {{classname}}::{{setter}}(const {{{dataType}}} &{{name}}) {
this->m_{{name}}_isSet = true;
}

bool {{classname}}::is_{{name}}_Set() const{
return m_{{name}}_isSet;
}

bool {{classname}}::is_{{name}}_Valid() const{
return m_{{name}}_isValid;
}

{{/vars}}{{/isEnum}}{{#isEnum}}
{{classname}}::e{{classname}} {{classname}}::getValue() const {
return m_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public:
{{^isEnum}}{{#vars}}
{{{dataType}}} {{getter}}() const;
void {{setter}}(const {{{dataType}}} &{{name}});
bool is_{{name}}_Set() const;
bool is_{{name}}_Valid() const;
{{/vars}}{{/isEnum}}{{#isEnum}}
{{#allowableValues}}
enum class e{{classname}} {{#enumVars}}{{#-first}}{{^isString}}: int {{/isString}}{{/-first}}{{/enumVars}}{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ void {{classname}}::{{setter}}(const {{{dataType}}} &{{name}}) {
this->m_{{name}}_isSet = true;
}

bool {{classname}}::is_{{name}}_Set() const{
return m_{{name}}_isSet;
}

bool {{classname}}::is_{{name}}_Valid() const{
return m_{{name}}_isValid;
}

{{/vars}}{{/isEnum}}{{#isEnum}}
{{classname}}::e{{classname}} {{classname}}::getValue() const {
return m_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public:
{{^isEnum}}{{#vars}}
{{{dataType}}} {{getter}}() const;
void {{setter}}(const {{{dataType}}} &{{name}});
bool is_{{name}}_Set() const;
bool is_{{name}}_Valid() const;
{{/vars}}{{/isEnum}}{{#isEnum}}
{{#allowableValues}}
enum class e{{classname}} {{#enumVars}}{{#-first}}{{^isString}}: int {{/isString}}{{/-first}}{{/enumVars}}{
Expand Down
24 changes: 24 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXApiResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ void PFXApiResponse::setCode(const qint32 &code) {
this->m_code_isSet = true;
}

bool PFXApiResponse::is_code_Set() const{
return m_code_isSet;
}

bool PFXApiResponse::is_code_Valid() const{
return m_code_isValid;
}

QString PFXApiResponse::getType() const {
return type;
}
Expand All @@ -99,6 +107,14 @@ void PFXApiResponse::setType(const QString &type) {
this->m_type_isSet = true;
}

bool PFXApiResponse::is_type_Set() const{
return m_type_isSet;
}

bool PFXApiResponse::is_type_Valid() const{
return m_type_isValid;
}

QString PFXApiResponse::getMessage() const {
return message;
}
Expand All @@ -107,6 +123,14 @@ void PFXApiResponse::setMessage(const QString &message) {
this->m_message_isSet = true;
}

bool PFXApiResponse::is_message_Set() const{
return m_message_isSet;
}

bool PFXApiResponse::is_message_Valid() const{
return m_message_isValid;
}

bool PFXApiResponse::isSet() const {
bool isObjectUpdated = false;
do {
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXApiResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ class PFXApiResponse : public PFXObject {

qint32 getCode() const;
void setCode(const qint32 &code);
bool is_code_Set() const;
bool is_code_Valid() const;

QString getType() const;
void setType(const QString &type);
bool is_type_Set() const;
bool is_type_Valid() const;

QString getMessage() const;
void setMessage(const QString &message);
bool is_message_Set() const;
bool is_message_Valid() const;

virtual bool isSet() const override;
virtual bool isValid() const override;
Expand Down
16 changes: 16 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXCategory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ void PFXCategory::setId(const qint64 &id) {
this->m_id_isSet = true;
}

bool PFXCategory::is_id_Set() const{
return m_id_isSet;
}

bool PFXCategory::is_id_Valid() const{
return m_id_isValid;
}

QString PFXCategory::getName() const {
return name;
}
Expand All @@ -90,6 +98,14 @@ void PFXCategory::setName(const QString &name) {
this->m_name_isSet = true;
}

bool PFXCategory::is_name_Set() const{
return m_name_isSet;
}

bool PFXCategory::is_name_Valid() const{
return m_name_isValid;
}

bool PFXCategory::isSet() const {
bool isObjectUpdated = false;
do {
Expand Down
4 changes: 4 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXCategory.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ class PFXCategory : public PFXObject {

qint64 getId() const;
void setId(const qint64 &id);
bool is_id_Set() const;
bool is_id_Valid() const;

QString getName() const;
void setName(const QString &name);
bool is_name_Set() const;
bool is_name_Valid() const;

virtual bool isSet() const override;
virtual bool isValid() const override;
Expand Down
48 changes: 48 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ void PFXOrder::setId(const qint64 &id) {
this->m_id_isSet = true;
}

bool PFXOrder::is_id_Set() const{
return m_id_isSet;
}

bool PFXOrder::is_id_Valid() const{
return m_id_isValid;
}

qint64 PFXOrder::getPetId() const {
return pet_id;
}
Expand All @@ -126,6 +134,14 @@ void PFXOrder::setPetId(const qint64 &pet_id) {
this->m_pet_id_isSet = true;
}

bool PFXOrder::is_pet_id_Set() const{
return m_pet_id_isSet;
}

bool PFXOrder::is_pet_id_Valid() const{
return m_pet_id_isValid;
}

qint32 PFXOrder::getQuantity() const {
return quantity;
}
Expand All @@ -134,6 +150,14 @@ void PFXOrder::setQuantity(const qint32 &quantity) {
this->m_quantity_isSet = true;
}

bool PFXOrder::is_quantity_Set() const{
return m_quantity_isSet;
}

bool PFXOrder::is_quantity_Valid() const{
return m_quantity_isValid;
}

QDateTime PFXOrder::getShipDate() const {
return ship_date;
}
Expand All @@ -142,6 +166,14 @@ void PFXOrder::setShipDate(const QDateTime &ship_date) {
this->m_ship_date_isSet = true;
}

bool PFXOrder::is_ship_date_Set() const{
return m_ship_date_isSet;
}

bool PFXOrder::is_ship_date_Valid() const{
return m_ship_date_isValid;
}

QString PFXOrder::getStatus() const {
return status;
}
Expand All @@ -150,6 +182,14 @@ void PFXOrder::setStatus(const QString &status) {
this->m_status_isSet = true;
}

bool PFXOrder::is_status_Set() const{
return m_status_isSet;
}

bool PFXOrder::is_status_Valid() const{
return m_status_isValid;
}

bool PFXOrder::isComplete() const {
return complete;
}
Expand All @@ -158,6 +198,14 @@ void PFXOrder::setComplete(const bool &complete) {
this->m_complete_isSet = true;
}

bool PFXOrder::is_complete_Set() const{
return m_complete_isSet;
}

bool PFXOrder::is_complete_Valid() const{
return m_complete_isValid;
}

bool PFXOrder::isSet() const {
bool isObjectUpdated = false;
do {
Expand Down
12 changes: 12 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXOrder.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,33 @@ class PFXOrder : public PFXObject {

qint64 getId() const;
void setId(const qint64 &id);
bool is_id_Set() const;
bool is_id_Valid() const;

qint64 getPetId() const;
void setPetId(const qint64 &pet_id);
bool is_pet_id_Set() const;
bool is_pet_id_Valid() const;

qint32 getQuantity() const;
void setQuantity(const qint32 &quantity);
bool is_quantity_Set() const;
bool is_quantity_Valid() const;

QDateTime getShipDate() const;
void setShipDate(const QDateTime &ship_date);
bool is_ship_date_Set() const;
bool is_ship_date_Valid() const;

QString getStatus() const;
void setStatus(const QString &status);
bool is_status_Set() const;
bool is_status_Valid() const;

bool isComplete() const;
void setComplete(const bool &complete);
bool is_complete_Set() const;
bool is_complete_Valid() const;

virtual bool isSet() const override;
virtual bool isValid() const override;
Expand Down
48 changes: 48 additions & 0 deletions samples/client/petstore/cpp-qt5/client/PFXPet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ void PFXPet::setId(const qint64 &id) {
this->m_id_isSet = true;
}

bool PFXPet::is_id_Set() const{
return m_id_isSet;
}

bool PFXPet::is_id_Valid() const{
return m_id_isValid;
}

PFXCategory PFXPet::getCategory() const {
return category;
}
Expand All @@ -126,6 +134,14 @@ void PFXPet::setCategory(const PFXCategory &category) {
this->m_category_isSet = true;
}

bool PFXPet::is_category_Set() const{
return m_category_isSet;
}

bool PFXPet::is_category_Valid() const{
return m_category_isValid;
}

QString PFXPet::getName() const {
return name;
}
Expand All @@ -134,6 +150,14 @@ void PFXPet::setName(const QString &name) {
this->m_name_isSet = true;
}

bool PFXPet::is_name_Set() const{
return m_name_isSet;
}

bool PFXPet::is_name_Valid() const{
return m_name_isValid;
}

QList<QString> PFXPet::getPhotoUrls() const {
return photo_urls;
}
Expand All @@ -142,6 +166,14 @@ void PFXPet::setPhotoUrls(const QList<QString> &photo_urls) {
this->m_photo_urls_isSet = true;
}

bool PFXPet::is_photo_urls_Set() const{
return m_photo_urls_isSet;
}

bool PFXPet::is_photo_urls_Valid() const{
return m_photo_urls_isValid;
}

QList<PFXTag> PFXPet::getTags() const {
return tags;
}
Expand All @@ -150,6 +182,14 @@ void PFXPet::setTags(const QList<PFXTag> &tags) {
this->m_tags_isSet = true;
}

bool PFXPet::is_tags_Set() const{
return m_tags_isSet;
}

bool PFXPet::is_tags_Valid() const{
return m_tags_isValid;
}

QString PFXPet::getStatus() const {
return status;
}
Expand All @@ -158,6 +198,14 @@ void PFXPet::setStatus(const QString &status) {
this->m_status_isSet = true;
}

bool PFXPet::is_status_Set() const{
return m_status_isSet;
}

bool PFXPet::is_status_Valid() const{
return m_status_isValid;
}

bool PFXPet::isSet() const {
bool isObjectUpdated = false;
do {
Expand Down
Loading