#include "kvi_settings.h"
#include "KviQString.h"
#include <QObject>
Go to the source code of this file.
◆ TORR_DECLARE_DESCRIPTOR
#define TORR_DECLARE_DESCRIPTOR |
( |
|
_interfaceclass | ) |
|
Value:
{ \
public: \
_interfaceclass##Descriptor(); \
~_interfaceclass##Descriptor(); \
\
protected: \
_interfaceclass * m_pInstance; \
QString m_szName; \
QString m_szDescription; \
\
public: \
const QString & name() override; \
const QString & description() override; \
};
Definition TorrentInterface.h:106
Definition TorrentInterface.h:35
◆ TORR_IMPLEMENT_DESCRIPTOR
#define TORR_IMPLEMENT_DESCRIPTOR |
( |
|
_interfaceclass, |
|
|
|
_name, |
|
|
|
_description |
|
) |
| |
Value: _interfaceclass##Descriptor::_interfaceclass##Descriptor() \
{ \
m_pInstance = nullptr; \
m_szName = _name; \
m_szDescription = _description; \
} \
_interfaceclass##Descriptor::~_interfaceclass##Descriptor() \
{ \
delete m_pInstance; \
} \
const QString & _interfaceclass##Descriptor::name() \
{ \
return m_szName; \
} \
const QString & _interfaceclass##Descriptor::description() \
{ \
return m_szDescription; \
} \
{ \
if(!m_pInstance) \
m_pInstance = new _interfaceclass(); \
return m_pInstance; \
}