SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Private Attributes | List of all members
SWGSDRangel::SWGErrorResponse Class Reference

#include <SWGErrorResponse.h>

+ Inheritance diagram for SWGSDRangel::SWGErrorResponse:
+ Collaboration diagram for SWGSDRangel::SWGErrorResponse:

Public Member Functions

 SWGErrorResponse ()
 
 SWGErrorResponse (QString *json)
 
virtual ~SWGErrorResponse ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGErrorResponsefromJson (QString &jsonString) override
 
QString * getMessage ()
 
void setMessage (QString *message)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

QString * message
 
bool m_message_isSet
 

Detailed Description

Definition at line 32 of file SWGErrorResponse.h.

Constructor & Destructor Documentation

◆ SWGErrorResponse() [1/2]

SWGSDRangel::SWGErrorResponse::SWGErrorResponse ( )

Definition at line 30 of file SWGErrorResponse.cpp.

References m_message_isSet, and message.

30  {
31  message = nullptr;
32  m_message_isSet = false;
33 }

◆ SWGErrorResponse() [2/2]

SWGSDRangel::SWGErrorResponse::SWGErrorResponse ( QString *  json)

Definition at line 25 of file SWGErrorResponse.cpp.

References fromJson(), and init().

25  {
26  init();
27  this->fromJson(*json);
28 }
virtual SWGErrorResponse * fromJson(QString &jsonString) override
+ Here is the call graph for this function:

◆ ~SWGErrorResponse()

SWGSDRangel::SWGErrorResponse::~SWGErrorResponse ( )
virtual

Definition at line 35 of file SWGErrorResponse.cpp.

References cleanup().

35  {
36  this->cleanup();
37 }
+ Here is the call graph for this function:

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGErrorResponse::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 68 of file SWGErrorResponse.cpp.

References asJsonObject().

Referenced by WebAPIRequestMapper::devicesetChannelIndexService(), WebAPIRequestMapper::devicesetChannelReportService(), WebAPIRequestMapper::devicesetChannelService(), WebAPIRequestMapper::devicesetChannelSettingsService(), WebAPIRequestMapper::devicesetChannelsReportService(), WebAPIRequestMapper::devicesetDeviceReportService(), WebAPIRequestMapper::devicesetDeviceRunService(), WebAPIRequestMapper::devicesetDeviceService(), WebAPIRequestMapper::devicesetDeviceSettingsService(), WebAPIRequestMapper::devicesetFocusService(), WebAPIRequestMapper::devicesetService(), WebAPIRequestMapper::instanceAMBEDevicesService(), WebAPIRequestMapper::instanceAMBESerialService(), WebAPIRequestMapper::instanceAudioInputCleanupService(), WebAPIRequestMapper::instanceAudioInputParametersService(), WebAPIRequestMapper::instanceAudioOutputCleanupService(), WebAPIRequestMapper::instanceAudioOutputParametersService(), WebAPIRequestMapper::instanceAudioService(), WebAPIRequestMapper::instanceChannelsService(), WebAPIRequestMapper::instanceConfigService(), WebAPIRequestMapper::instanceDeviceSetService(), WebAPIRequestMapper::instanceDeviceSetsService(), WebAPIRequestMapper::instanceDevicesService(), WebAPIRequestMapper::instanceLocationService(), WebAPIRequestMapper::instanceLoggingService(), WebAPIRequestMapper::instancePresetFileService(), WebAPIRequestMapper::instancePresetService(), WebAPIRequestMapper::instancePresetsService(), WebAPIRequestMapper::instanceSummaryService(), WebAPIRequestMapper::parseJsonBody(), and WebAPIRequestMapper::service().

69 {
70  QJsonObject* obj = this->asJsonObject();
71 
72  QJsonDocument doc(*obj);
73  QByteArray bytes = doc.toJson();
74  delete obj;
75  return QString(bytes);
76 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ asJsonObject()

QJsonObject * SWGSDRangel::SWGErrorResponse::asJsonObject ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 79 of file SWGErrorResponse.cpp.

References message, and SWGSDRangel::toJsonValue().

Referenced by asJson().

79  {
80  QJsonObject* obj = new QJsonObject();
81  if(message != nullptr && *message != QString("")){
82  toJsonValue(QString("message"), message, obj, QString("QString"));
83  }
84 
85  return obj;
86 }
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
Definition: SWGHelpers.cpp:383
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGErrorResponse::cleanup ( )

Definition at line 46 of file SWGErrorResponse.cpp.

References message.

Referenced by ~SWGErrorResponse().

46  {
47  if(message != nullptr) {
48  delete message;
49  }
50 }
+ Here is the caller graph for this function:

◆ fromJson()

SWGErrorResponse * SWGSDRangel::SWGErrorResponse::fromJson ( QString &  jsonString)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 53 of file SWGErrorResponse.cpp.

References fromJsonObject().

Referenced by SWGErrorResponse().

53  {
54  QByteArray array (json.toStdString().c_str());
55  QJsonDocument doc = QJsonDocument::fromJson(array);
56  QJsonObject jsonObject = doc.object();
57  this->fromJsonObject(jsonObject);
58  return this;
59 }
virtual void fromJsonObject(QJsonObject &json) override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromJsonObject()

void SWGSDRangel::SWGErrorResponse::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 62 of file SWGErrorResponse.cpp.

References message, and SWGSDRangel::setValue().

Referenced by fromJson().

62  {
63  ::SWGSDRangel::setValue(&message, pJson["message"], "QString", "QString");
64 
65 }
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
Definition: SWGHelpers.cpp:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessage()

QString * SWGSDRangel::SWGErrorResponse::getMessage ( )

Definition at line 89 of file SWGErrorResponse.cpp.

References message.

Referenced by WebAPIAdapterGUI::devicesetChannelDelete(), WebAPIAdapterSrv::devicesetChannelDelete(), WebAPIAdapterInterface::devicesetChannelDelete(), WebAPIRequestMapper::devicesetChannelIndexService(), WebAPIAdapterGUI::devicesetChannelPost(), WebAPIAdapterSrv::devicesetChannelPost(), WebAPIAdapterInterface::devicesetChannelPost(), WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterInterface::devicesetChannelReportGet(), WebAPIRequestMapper::devicesetChannelReportService(), WebAPIRequestMapper::devicesetChannelService(), WebAPIAdapterGUI::devicesetChannelSettingsGet(), WebAPIAdapterSrv::devicesetChannelSettingsGet(), WebAPIAdapterInterface::devicesetChannelSettingsGet(), WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), WebAPIAdapterSrv::devicesetChannelSettingsPutPatch(), WebAPIAdapterInterface::devicesetChannelSettingsPutPatch(), WebAPIRequestMapper::devicesetChannelSettingsService(), WebAPIAdapterGUI::devicesetChannelsReportGet(), WebAPIAdapterSrv::devicesetChannelsReportGet(), WebAPIAdapterInterface::devicesetChannelsReportGet(), WebAPIRequestMapper::devicesetChannelsReportService(), WebAPIAdapterGUI::devicesetDevicePut(), WebAPIAdapterSrv::devicesetDevicePut(), WebAPIAdapterInterface::devicesetDevicePut(), WebAPIAdapterGUI::devicesetDeviceReportGet(), WebAPIAdapterSrv::devicesetDeviceReportGet(), WebAPIAdapterInterface::devicesetDeviceReportGet(), WebAPIRequestMapper::devicesetDeviceReportService(), WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterInterface::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunGet(), WebAPIAdapterSrv::devicesetDeviceRunGet(), WebAPIAdapterInterface::devicesetDeviceRunGet(), WebAPIAdapterGUI::devicesetDeviceRunPost(), WebAPIAdapterSrv::devicesetDeviceRunPost(), WebAPIAdapterInterface::devicesetDeviceRunPost(), WebAPIRequestMapper::devicesetDeviceRunService(), WebAPIRequestMapper::devicesetDeviceService(), WebAPIAdapterGUI::devicesetDeviceSettingsGet(), WebAPIAdapterSrv::devicesetDeviceSettingsGet(), WebAPIAdapterInterface::devicesetDeviceSettingsGet(), WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch(), WebAPIAdapterInterface::devicesetDeviceSettingsPutPatch(), WebAPIRequestMapper::devicesetDeviceSettingsService(), WebAPIAdapterGUI::devicesetFocusPatch(), WebAPIAdapterSrv::devicesetFocusPatch(), WebAPIAdapterInterface::devicesetFocusPatch(), WebAPIRequestMapper::devicesetFocusService(), WebAPIAdapterGUI::devicesetGet(), WebAPIAdapterSrv::devicesetGet(), WebAPIAdapterInterface::devicesetGet(), WebAPIRequestMapper::devicesetService(), WebAPIAdapterInterface::instanceAMBEDevicesDelete(), WebAPIAdapterInterface::instanceAMBEDevicesGet(), WebAPIAdapterInterface::instanceAMBEDevicesPatch(), WebAPIAdapterInterface::instanceAMBEDevicesPut(), WebAPIRequestMapper::instanceAMBEDevicesService(), WebAPIAdapterInterface::instanceAMBESerialGet(), WebAPIRequestMapper::instanceAMBESerialService(), WebAPIAdapterInterface::instanceAudioGet(), WebAPIAdapterInterface::instanceAudioInputCleanupPatch(), WebAPIRequestMapper::instanceAudioInputCleanupService(), WebAPIAdapterGUI::instanceAudioInputDelete(), WebAPIAdapterSrv::instanceAudioInputDelete(), WebAPIAdapterInterface::instanceAudioInputDelete(), WebAPIRequestMapper::instanceAudioInputParametersService(), WebAPIAdapterGUI::instanceAudioInputPatch(), WebAPIAdapterSrv::instanceAudioInputPatch(), WebAPIAdapterInterface::instanceAudioInputPatch(), WebAPIAdapterInterface::instanceAudioOutputCleanupPatch(), WebAPIRequestMapper::instanceAudioOutputCleanupService(), WebAPIAdapterGUI::instanceAudioOutputDelete(), WebAPIAdapterSrv::instanceAudioOutputDelete(), WebAPIAdapterInterface::instanceAudioOutputDelete(), WebAPIRequestMapper::instanceAudioOutputParametersService(), WebAPIAdapterGUI::instanceAudioOutputPatch(), WebAPIAdapterSrv::instanceAudioOutputPatch(), WebAPIAdapterInterface::instanceAudioOutputPatch(), WebAPIRequestMapper::instanceAudioService(), WebAPIAdapterInterface::instanceChannels(), WebAPIRequestMapper::instanceChannelsService(), WebAPIAdapterInterface::instanceConfigGet(), WebAPIAdapterGUI::instanceDelete(), WebAPIAdapterInterface::instanceDelete(), WebAPIAdapterInterface::instanceDevices(), WebAPIAdapterGUI::instanceDeviceSetDelete(), WebAPIAdapterSrv::instanceDeviceSetDelete(), WebAPIAdapterInterface::instanceDeviceSetDelete(), WebAPIAdapterInterface::instanceDeviceSetPost(), WebAPIRequestMapper::instanceDeviceSetService(), WebAPIAdapterInterface::instanceDeviceSetsGet(), WebAPIRequestMapper::instanceDeviceSetsService(), WebAPIRequestMapper::instanceDevicesService(), WebAPIAdapterInterface::instanceLocationGet(), WebAPIAdapterInterface::instanceLocationPut(), WebAPIRequestMapper::instanceLocationService(), WebAPIAdapterInterface::instanceLoggingGet(), WebAPIAdapterInterface::instanceLoggingPut(), WebAPIRequestMapper::instanceLoggingService(), WebAPIAdapterGUI::instancePresetDelete(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterInterface::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterInterface::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterInterface::instancePresetFilePut(), WebAPIRequestMapper::instancePresetFileService(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterInterface::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterInterface::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterInterface::instancePresetPut(), WebAPIRequestMapper::instancePresetService(), WebAPIAdapterInterface::instancePresetsGet(), WebAPIAdapterInterface::instanceSummary(), WebAPIRequestMapper::instanceSummaryService(), WebAPIRequestMapper::parseJsonBody(), and WebAPIRequestMapper::service().

89  {
90  return message;
91 }
+ Here is the caller graph for this function:

◆ init()

void SWGSDRangel::SWGErrorResponse::init ( )

Definition at line 40 of file SWGErrorResponse.cpp.

References m_message_isSet, and message.

Referenced by WebAPIAdapterGUI::devicesetChannelDelete(), WebAPIAdapterSrv::devicesetChannelDelete(), WebAPIAdapterInterface::devicesetChannelDelete(), WebAPIRequestMapper::devicesetChannelIndexService(), WebAPIAdapterGUI::devicesetChannelPost(), WebAPIAdapterSrv::devicesetChannelPost(), WebAPIAdapterInterface::devicesetChannelPost(), WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterInterface::devicesetChannelReportGet(), WebAPIRequestMapper::devicesetChannelReportService(), WebAPIRequestMapper::devicesetChannelService(), WebAPIAdapterGUI::devicesetChannelSettingsGet(), WebAPIAdapterSrv::devicesetChannelSettingsGet(), WebAPIAdapterInterface::devicesetChannelSettingsGet(), WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), WebAPIAdapterSrv::devicesetChannelSettingsPutPatch(), WebAPIAdapterInterface::devicesetChannelSettingsPutPatch(), WebAPIRequestMapper::devicesetChannelSettingsService(), WebAPIAdapterGUI::devicesetChannelsReportGet(), WebAPIAdapterSrv::devicesetChannelsReportGet(), WebAPIAdapterInterface::devicesetChannelsReportGet(), WebAPIRequestMapper::devicesetChannelsReportService(), WebAPIAdapterGUI::devicesetDevicePut(), WebAPIAdapterSrv::devicesetDevicePut(), WebAPIAdapterInterface::devicesetDevicePut(), WebAPIAdapterGUI::devicesetDeviceReportGet(), WebAPIAdapterSrv::devicesetDeviceReportGet(), WebAPIAdapterInterface::devicesetDeviceReportGet(), WebAPIRequestMapper::devicesetDeviceReportService(), WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterInterface::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunGet(), WebAPIAdapterSrv::devicesetDeviceRunGet(), WebAPIAdapterInterface::devicesetDeviceRunGet(), WebAPIAdapterGUI::devicesetDeviceRunPost(), WebAPIAdapterSrv::devicesetDeviceRunPost(), WebAPIAdapterInterface::devicesetDeviceRunPost(), WebAPIRequestMapper::devicesetDeviceRunService(), WebAPIRequestMapper::devicesetDeviceService(), WebAPIAdapterGUI::devicesetDeviceSettingsGet(), WebAPIAdapterSrv::devicesetDeviceSettingsGet(), WebAPIAdapterInterface::devicesetDeviceSettingsGet(), WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch(), WebAPIAdapterInterface::devicesetDeviceSettingsPutPatch(), WebAPIRequestMapper::devicesetDeviceSettingsService(), WebAPIAdapterGUI::devicesetFocusPatch(), WebAPIAdapterInterface::devicesetFocusPatch(), WebAPIRequestMapper::devicesetFocusService(), WebAPIAdapterGUI::devicesetGet(), WebAPIAdapterSrv::devicesetGet(), WebAPIAdapterInterface::devicesetGet(), WebAPIRequestMapper::devicesetService(), WebAPIAdapterInterface::instanceAMBEDevicesDelete(), WebAPIAdapterInterface::instanceAMBEDevicesGet(), WebAPIAdapterInterface::instanceAMBEDevicesPatch(), WebAPIAdapterInterface::instanceAMBEDevicesPut(), WebAPIRequestMapper::instanceAMBEDevicesService(), WebAPIAdapterInterface::instanceAMBESerialGet(), WebAPIRequestMapper::instanceAMBESerialService(), WebAPIAdapterInterface::instanceAudioGet(), WebAPIAdapterInterface::instanceAudioInputCleanupPatch(), WebAPIRequestMapper::instanceAudioInputCleanupService(), WebAPIAdapterGUI::instanceAudioInputDelete(), WebAPIAdapterSrv::instanceAudioInputDelete(), WebAPIAdapterInterface::instanceAudioInputDelete(), WebAPIRequestMapper::instanceAudioInputParametersService(), WebAPIAdapterGUI::instanceAudioInputPatch(), WebAPIAdapterSrv::instanceAudioInputPatch(), WebAPIAdapterInterface::instanceAudioInputPatch(), WebAPIAdapterInterface::instanceAudioOutputCleanupPatch(), WebAPIRequestMapper::instanceAudioOutputCleanupService(), WebAPIAdapterGUI::instanceAudioOutputDelete(), WebAPIAdapterSrv::instanceAudioOutputDelete(), WebAPIAdapterInterface::instanceAudioOutputDelete(), WebAPIRequestMapper::instanceAudioOutputParametersService(), WebAPIAdapterGUI::instanceAudioOutputPatch(), WebAPIAdapterSrv::instanceAudioOutputPatch(), WebAPIAdapterInterface::instanceAudioOutputPatch(), WebAPIRequestMapper::instanceAudioService(), WebAPIAdapterInterface::instanceChannels(), WebAPIRequestMapper::instanceChannelsService(), WebAPIAdapterInterface::instanceConfigGet(), WebAPIAdapterInterface::instanceDelete(), WebAPIAdapterInterface::instanceDevices(), WebAPIAdapterGUI::instanceDeviceSetDelete(), WebAPIAdapterSrv::instanceDeviceSetDelete(), WebAPIAdapterInterface::instanceDeviceSetDelete(), WebAPIAdapterInterface::instanceDeviceSetPost(), WebAPIRequestMapper::instanceDeviceSetService(), WebAPIAdapterInterface::instanceDeviceSetsGet(), WebAPIRequestMapper::instanceDeviceSetsService(), WebAPIRequestMapper::instanceDevicesService(), WebAPIAdapterInterface::instanceLocationGet(), WebAPIAdapterInterface::instanceLocationPut(), WebAPIRequestMapper::instanceLocationService(), WebAPIAdapterInterface::instanceLoggingGet(), WebAPIAdapterInterface::instanceLoggingPut(), WebAPIRequestMapper::instanceLoggingService(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterInterface::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterInterface::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterInterface::instancePresetFilePut(), WebAPIRequestMapper::instancePresetFileService(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterInterface::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterInterface::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterInterface::instancePresetPut(), WebAPIRequestMapper::instancePresetService(), WebAPIAdapterInterface::instancePresetsGet(), WebAPIAdapterInterface::instanceSummary(), WebAPIRequestMapper::instanceSummaryService(), WebAPIRequestMapper::parseJsonBody(), WebAPIRequestMapper::service(), and SWGErrorResponse().

40  {
41  message = new QString("");
42  m_message_isSet = false;
43 }
+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGErrorResponse::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 100 of file SWGErrorResponse.cpp.

References message.

100  {
101  bool isObjectUpdated = false;
102  do{
103  if(message != nullptr && *message != QString("")){ isObjectUpdated = true; break;}
104  }while(false);
105  return isObjectUpdated;
106 }

◆ setMessage()

void SWGSDRangel::SWGErrorResponse::setMessage ( QString *  message)

Definition at line 93 of file SWGErrorResponse.cpp.

References m_message_isSet, and message.

93  {
94  this->message = message;
95  this->m_message_isSet = true;
96 }

Member Data Documentation

◆ m_message_isSet

bool SWGSDRangel::SWGErrorResponse::m_message_isSet
private

Definition at line 53 of file SWGErrorResponse.h.

Referenced by init(), setMessage(), and SWGErrorResponse().

◆ message

QString* SWGSDRangel::SWGErrorResponse::message
private

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