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

#include <SWGBandwidth.h>

+ Inheritance diagram for SWGSDRangel::SWGBandwidth:
+ Collaboration diagram for SWGSDRangel::SWGBandwidth:

Public Member Functions

 SWGBandwidth ()
 
 SWGBandwidth (QString *json)
 
virtual ~SWGBandwidth ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGBandwidthfromJson (QString &jsonString) override
 
qint32 getBandwidth ()
 
void setBandwidth (qint32 bandwidth)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

qint32 bandwidth
 
bool m_bandwidth_isSet
 

Detailed Description

Definition at line 31 of file SWGBandwidth.h.

Constructor & Destructor Documentation

◆ SWGBandwidth() [1/2]

SWGSDRangel::SWGBandwidth::SWGBandwidth ( )

Definition at line 30 of file SWGBandwidth.cpp.

References bandwidth, and m_bandwidth_isSet.

30  {
31  bandwidth = 0;
32  m_bandwidth_isSet = false;
33 }

◆ SWGBandwidth() [2/2]

SWGSDRangel::SWGBandwidth::SWGBandwidth ( QString *  json)

Definition at line 25 of file SWGBandwidth.cpp.

References fromJson(), and init().

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

◆ ~SWGBandwidth()

SWGSDRangel::SWGBandwidth::~SWGBandwidth ( )
virtual

Definition at line 35 of file SWGBandwidth.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGBandwidth::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 66 of file SWGBandwidth.cpp.

References asJsonObject().

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

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 77 of file SWGBandwidth.cpp.

References bandwidth, and m_bandwidth_isSet.

Referenced by asJson().

77  {
78  QJsonObject* obj = new QJsonObject();
80  obj->insert("bandwidth", QJsonValue(bandwidth));
81  }
82 
83  return obj;
84 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGBandwidth::cleanup ( )

Definition at line 46 of file SWGBandwidth.cpp.

Referenced by ~SWGBandwidth().

46  {
47 
48 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 51 of file SWGBandwidth.cpp.

References fromJsonObject().

Referenced by SWGBandwidth().

51  {
52  QByteArray array (json.toStdString().c_str());
53  QJsonDocument doc = QJsonDocument::fromJson(array);
54  QJsonObject jsonObject = doc.object();
55  this->fromJsonObject(jsonObject);
56  return this;
57 }
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::SWGBandwidth::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 60 of file SWGBandwidth.cpp.

References bandwidth, and SWGSDRangel::setValue().

Referenced by fromJson().

60  {
61  ::SWGSDRangel::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
62 
63 }
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:

◆ getBandwidth()

qint32 SWGSDRangel::SWGBandwidth::getBandwidth ( )

Definition at line 87 of file SWGBandwidth.cpp.

References bandwidth.

87  {
88  return bandwidth;
89 }

◆ init()

void SWGSDRangel::SWGBandwidth::init ( )

Definition at line 40 of file SWGBandwidth.cpp.

References bandwidth, and m_bandwidth_isSet.

Referenced by SWGBandwidth().

40  {
41  bandwidth = 0;
42  m_bandwidth_isSet = false;
43 }
+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGBandwidth::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 98 of file SWGBandwidth.cpp.

References m_bandwidth_isSet.

98  {
99  bool isObjectUpdated = false;
100  do{
101  if(m_bandwidth_isSet){ isObjectUpdated = true; break;}
102  }while(false);
103  return isObjectUpdated;
104 }

◆ setBandwidth()

void SWGSDRangel::SWGBandwidth::setBandwidth ( qint32  bandwidth)

Definition at line 91 of file SWGBandwidth.cpp.

References bandwidth, and m_bandwidth_isSet.

91  {
92  this->bandwidth = bandwidth;
93  this->m_bandwidth_isSet = true;
94 }

Member Data Documentation

◆ bandwidth

qint32 SWGSDRangel::SWGBandwidth::bandwidth
private

◆ m_bandwidth_isSet

bool SWGSDRangel::SWGBandwidth::m_bandwidth_isSet
private

Definition at line 52 of file SWGBandwidth.h.

Referenced by asJsonObject(), init(), isSet(), setBandwidth(), and SWGBandwidth().


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