KVIrc  4.9.2
DeveloperAPIs
Classes | Macros
TorrentInterface.h File Reference
#include "kvi_settings.h"
#include "KviQString.h"
#include <QObject>

Go to the source code of this file.

Classes

class  TorrentInterface
 
class  TorrentInterfaceDescriptor
 

Macros

#define TORR_DECLARE_DESCRIPTOR(_interfaceclass)
 
#define TORR_IMPLEMENT_DESCRIPTOR(_interfaceclass, _name, _description)
 

Macro Definition Documentation

#define TORR_DECLARE_DESCRIPTOR (   _interfaceclass)
Value:
class _interfaceclass##Descriptor : public TorrentInterfaceDescriptor \
{ \
public: \
_interfaceclass##Descriptor(); \
virtual ~_interfaceclass##Descriptor(); \
\
protected: \
_interfaceclass * m_pInstance; \
QString m_szName; \
QString m_szDescription; \
\
public: \
virtual const QString & name(); \
virtual const QString & description(); \
virtual TorrentInterface * instance(); \
};
Definition: TorrentInterface.h:106
virtual const QString & name()=0
virtual TorrentInterface * instance()=0
Definition: TorrentInterface.h:35
virtual const QString & description()=0
#define TORR_IMPLEMENT_DESCRIPTOR (   _interfaceclass,
  _name,
  _description 
)
Value:
_interfaceclass##Descriptor::_interfaceclass##Descriptor() \
{ \
m_pInstance = 0; \
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; \
} \
TorrentInterface * _interfaceclass##Descriptor::instance() \
{ \
if(!m_pInstance) \
m_pInstance = new _interfaceclass(); \
return m_pInstance; \
}
Definition: TorrentInterface.h:106
if(m_pFile) delete m_pFile
QString name()
Definition: KviRuntimeInfo.cpp:655