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::SWGSoapySDRFrequencySetting Class Reference

#include <SWGSoapySDRFrequencySetting.h>

+ Inheritance diagram for SWGSDRangel::SWGSoapySDRFrequencySetting:
+ Collaboration diagram for SWGSDRangel::SWGSoapySDRFrequencySetting:

Public Member Functions

 SWGSoapySDRFrequencySetting ()
 
 SWGSoapySDRFrequencySetting (QString *json)
 
virtual ~SWGSoapySDRFrequencySetting ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGSoapySDRFrequencySettingfromJson (QString &jsonString) override
 
QString * getName ()
 
void setName (QString *name)
 
QList< SWGRangeFloat * > * getRanges ()
 
void setRanges (QList< SWGRangeFloat *> *ranges)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

QString * name
 
bool m_name_isSet
 
QList< SWGRangeFloat * > * ranges
 
bool m_ranges_isSet
 

Detailed Description

Definition at line 34 of file SWGSoapySDRFrequencySetting.h.

Constructor & Destructor Documentation

◆ SWGSoapySDRFrequencySetting() [1/2]

SWGSDRangel::SWGSoapySDRFrequencySetting::SWGSoapySDRFrequencySetting ( )

◆ SWGSoapySDRFrequencySetting() [2/2]

SWGSDRangel::SWGSoapySDRFrequencySetting::SWGSoapySDRFrequencySetting ( QString *  json)

Definition at line 25 of file SWGSoapySDRFrequencySetting.cpp.

References fromJson(), and init().

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

◆ ~SWGSoapySDRFrequencySetting()

SWGSDRangel::SWGSoapySDRFrequencySetting::~SWGSoapySDRFrequencySetting ( )
virtual

Definition at line 37 of file SWGSoapySDRFrequencySetting.cpp.

References cleanup().

+ Here is the call graph for this function:

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGSoapySDRFrequencySetting::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 81 of file SWGSoapySDRFrequencySetting.cpp.

References asJsonObject().

82 {
83  QJsonObject* obj = this->asJsonObject();
84 
85  QJsonDocument doc(*obj);
86  QByteArray bytes = doc.toJson();
87  delete obj;
88  return QString(bytes);
89 }
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 92 of file SWGSoapySDRFrequencySetting.cpp.

References name, ranges, SWGSDRangel::toJsonArray(), and SWGSDRangel::toJsonValue().

Referenced by asJson().

92  {
93  QJsonObject* obj = new QJsonObject();
94  if(name != nullptr && *name != QString("")){
95  toJsonValue(QString("name"), name, obj, QString("QString"));
96  }
97  if(ranges->size() > 0){
98  toJsonArray((QList<void*>*)ranges, obj, "ranges", "SWGRangeFloat");
99  }
100 
101  return obj;
102 }
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
Definition: SWGHelpers.cpp:383
void toJsonArray(QList< void *> *value, QJsonObject *output, QString innerName, QString innerType)
Definition: SWGHelpers.cpp:445
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGSoapySDRFrequencySetting::cleanup ( )

Definition at line 50 of file SWGSoapySDRFrequencySetting.cpp.

References name, and ranges.

Referenced by ~SWGSoapySDRFrequencySetting().

50  {
51  if(name != nullptr) {
52  delete name;
53  }
54  if(ranges != nullptr) {
55  auto arr = ranges;
56  for(auto o: *arr) {
57  delete o;
58  }
59  delete ranges;
60  }
61 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 64 of file SWGSoapySDRFrequencySetting.cpp.

References fromJsonObject().

Referenced by SWGSoapySDRFrequencySetting().

64  {
65  QByteArray array (json.toStdString().c_str());
66  QJsonDocument doc = QJsonDocument::fromJson(array);
67  QJsonObject jsonObject = doc.object();
68  this->fromJsonObject(jsonObject);
69  return this;
70 }
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::SWGSoapySDRFrequencySetting::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 73 of file SWGSoapySDRFrequencySetting.cpp.

References name, ranges, and SWGSDRangel::setValue().

Referenced by fromJson().

73  {
74  ::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
75 
76 
77  ::SWGSDRangel::setValue(&ranges, pJson["ranges"], "QList", "SWGRangeFloat");
78 }
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:

◆ getName()

QString * SWGSDRangel::SWGSoapySDRFrequencySetting::getName ( )

Definition at line 105 of file SWGSoapySDRFrequencySetting.cpp.

References name.

105  {
106  return name;
107 }

◆ getRanges()

QList< SWGRangeFloat * > * SWGSDRangel::SWGSoapySDRFrequencySetting::getRanges ( )

Definition at line 115 of file SWGSoapySDRFrequencySetting.cpp.

References ranges.

115  {
116  return ranges;
117 }

◆ init()

void SWGSDRangel::SWGSoapySDRFrequencySetting::init ( )

Definition at line 42 of file SWGSoapySDRFrequencySetting.cpp.

References m_name_isSet, m_ranges_isSet, name, and ranges.

Referenced by SWGSoapySDRFrequencySetting().

+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGSoapySDRFrequencySetting::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 126 of file SWGSoapySDRFrequencySetting.cpp.

References name, and ranges.

126  {
127  bool isObjectUpdated = false;
128  do{
129  if(name != nullptr && *name != QString("")){ isObjectUpdated = true; break;}
130  if(ranges->size() > 0){ isObjectUpdated = true; break;}
131  }while(false);
132  return isObjectUpdated;
133 }

◆ setName()

void SWGSDRangel::SWGSoapySDRFrequencySetting::setName ( QString *  name)

Definition at line 109 of file SWGSoapySDRFrequencySetting.cpp.

References m_name_isSet, and name.

◆ setRanges()

void SWGSDRangel::SWGSoapySDRFrequencySetting::setRanges ( QList< SWGRangeFloat *> *  ranges)

Definition at line 119 of file SWGSoapySDRFrequencySetting.cpp.

References m_ranges_isSet, and ranges.

119  {
120  this->ranges = ranges;
121  this->m_ranges_isSet = true;
122 }

Member Data Documentation

◆ m_name_isSet

bool SWGSDRangel::SWGSoapySDRFrequencySetting::m_name_isSet
private

Definition at line 58 of file SWGSoapySDRFrequencySetting.h.

Referenced by init(), setName(), and SWGSoapySDRFrequencySetting().

◆ m_ranges_isSet

bool SWGSDRangel::SWGSoapySDRFrequencySetting::m_ranges_isSet
private

Definition at line 61 of file SWGSoapySDRFrequencySetting.h.

Referenced by init(), setRanges(), and SWGSoapySDRFrequencySetting().

◆ name

QString* SWGSDRangel::SWGSoapySDRFrequencySetting::name
private

◆ ranges

QList<SWGRangeFloat*>* SWGSDRangel::SWGSoapySDRFrequencySetting::ranges
private

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