KVIrc  4.9.2
DeveloperAPIs
Classes | Macros
MpInterface.h File Reference
#include "kvi_settings.h"
#include "KviQString.h"
#include "KviKvsTypes.h"

Go to the source code of this file.

Classes

class  MpInterface
 
class  MpInterfaceDescriptor
 

Macros

#define MP_CREATE_DESCRIPTOR(_interfaceclass)   new _interfaceclass##Descriptor()
 
#define MP_DECLARE_DESCRIPTOR(_interfaceclass)
 
#define MP_IMPLEMENT_DESCRIPTOR(_interfaceclass, _name, _description)
 

Macro Definition Documentation

#define MP_CREATE_DESCRIPTOR (   _interfaceclass)    new _interfaceclass##Descriptor()

Referenced by mediaplayer_module_init().

#define MP_DECLARE_DESCRIPTOR (   _interfaceclass)
Value:
class _interfaceclass##Descriptor : public MpInterfaceDescriptor \
{ \
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 MpInterface * instance(); \
};
Definition: MpInterface.h:188
virtual MpInterface * instance()=0
Definition: MpInterface.h:31
virtual const QString & description()=0
virtual const QString & name()=0
#define MP_IMPLEMENT_DESCRIPTOR (   _interfaceclass,
  _name,
  _description 
)
Value:
_interfaceclass##Descriptor::_interfaceclass##Descriptor() \
{ \
m_pInstance = 0; \
m_szName = _name; \
m_szDescription = _description; \
} \
_interfaceclass##Descriptor::~_interfaceclass##Descriptor() \
{ \
if(m_pInstance) \
delete m_pInstance; \
} \
const QString & _interfaceclass##Descriptor::name() \
{ \
return m_szName; \
} \
const QString & _interfaceclass##Descriptor::description() \
{ \
return m_szDescription; \
} \
MpInterface * _interfaceclass##Descriptor::instance() \
{ \
if(!m_pInstance) \
m_pInstance = new _interfaceclass(); \
return m_pInstance; \
}
Definition: MpInterface.h:188
if(m_pFile) delete m_pFile
QString name()
Definition: KviRuntimeInfo.cpp:655