18 #include <QJsonDocument> 57 key =
new QString(
"");
63 name =
new QString(
"");
67 units =
new QString(
"");
94 if(
units !=
nullptr) {
97 if(
range !=
nullptr) {
118 QByteArray array (json.toStdString().c_str());
119 QJsonDocument doc = QJsonDocument::fromJson(array);
120 QJsonObject jsonObject = doc.object();
152 QJsonDocument doc(*obj);
153 QByteArray bytes = doc.toJson();
155 return QString(bytes);
160 QJsonObject* obj =
new QJsonObject();
161 if(
key !=
nullptr && *
key != QString(
"")){
170 if(
name !=
nullptr && *
name != QString(
"")){
176 if(
units !=
nullptr && *
units != QString(
"")){
285 bool isObjectUpdated =
false;
287 if(
key !=
nullptr && *
key != QString(
"")){ isObjectUpdated =
true;
break;}
290 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
292 if(
units !=
nullptr && *
units != QString(
"")){ isObjectUpdated =
true;
break;}
293 if(
range !=
nullptr &&
range->
isSet()){ isObjectUpdated =
true;
break;}
294 if(
value_options->size() > 0){ isObjectUpdated =
true;
break;}
295 if(
option_names->size() > 0){ isObjectUpdated =
true;
break;}
297 return isObjectUpdated;
QString * getDescription()
QList< QString * > * value_options
virtual bool isSet() override
QList< QString * > * getValueOptions()
QList< QString * > * getOptionNames()
void setName(QString *name)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setValueOptions(QList< QString *> *value_options)
virtual void fromJsonObject(QJsonObject &json) override
bool m_value_options_isSet
virtual QJsonObject * asJsonObject() override
void setRange(SWGRangeFloat *range)
bool m_option_names_isSet
void setValueString(QString *value_string)
void setValueType(QString *value_type)
void setKey(QString *key)
bool m_value_string_isSet
SWGRangeFloat * getRange()
void setUnits(QString *units)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void toJsonArray(QList< void *> *value, QJsonObject *output, QString innerName, QString innerType)
QString * getValueString()
void setDescription(QString *description)
virtual SWGArgInfo * fromJson(QString &jsonString) override
void setOptionNames(QList< QString *> *option_names)
QList< QString * > * option_names
virtual QString asJson() override
virtual bool isSet() override