KVIrc  4.9.2
DeveloperAPIs
Macros
object_macros.h File Reference
#include "KviKvsKernel.h"
#include "KviKvsObject.h"
#include "KviKvsObjectClass.h"
#include "KviKvsObjectController.h"
#include "KviKvsObjectFunctionCall.h"

Go to the source code of this file.

Macros

#define CHECK_HOBJECT_IS_WIDGET(__pObject)
 
#define CHECK_INTERNAL_POINTER(__pointer)
 
#define KVSO_BEGIN_CONSTRUCTOR(__className, __baseClass)
 
#define KVSO_BEGIN_DESTRUCTOR(__className)
 
#define KVSO_BEGIN_REGISTERCLASS(__className, __stringName, __baseClass)
 
#define KVSO_CLASS_FUNCTION(__className, __functionName)   bool KvsObject_##__className::__functionName(KviKvsObjectFunctionCall * c)
 
#define KVSO_DECLARE_OBJECT(__className)
 
#define KVSO_END_CONSTRUCTOR(__className)   }
 
#define KVSO_END_DESTRUCTOR(__className)   }
 
#define KVSO_END_REGISTERCLASS(__className)   }
 
#define KVSO_REGISTER_HANDLER(__className, __szName, __proc)   g_pKvs##__className##Class->registerFunctionHandler(__szName, (KviKvsObjectFunctionHandlerProc)(KVI_PTR2MEMBER(__className::__proc)));
 
#define KVSO_REGISTER_HANDLER_BY_NAME(__className, __szName)   g_pKvs##__className##Class->registerFunctionHandler(#__szName, (KviKvsObjectFunctionHandlerProc)(KVI_PTR2MEMBER(__className::__szName)));
 
#define KVSO_REGISTER_STANDARD_FALSERETURN_HANDLER(__className, __szName)   g_pKvs##__className##Class->registerStandardFalseReturnFunctionHandler(__szName);
 
#define KVSO_REGISTER_STANDARD_NOTHINGRETURN_HANDLER(__className, __szName)   g_pKvs##__className##Class->registerStandardNothingReturnFunctionHandler(__szName);
 
#define KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER(__className, __szName)   g_pKvs##__className##Class->registerStandardTrueReturnFunctionHandler(__szName);
 
#define SET_OBJECT(__className)
 

Macro Definition Documentation

#define CHECK_HOBJECT_IS_WIDGET (   __pObject)
Value:
if(!__pObject) \
{ \
c->warning(__tr2qs_ctx("Widget parameter is not an object", "objects")); \
return true; \
} \
if(!__pObject->object()) \
{ \
c->warning(__tr2qs_ctx("Widget parameter is not a valid object", "objects")); \
return true; \
} \
if(!__pObject->object()->isWidgetType()) \
{ \
c->warning(__tr2qs_ctx("Widget object required", "objects")); \
return true; \
}
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
if(m_pFile) delete m_pFile
audacious __tr2qs_ctx("An interface for the UNIX Audacious media player.\n""Download it from http://audacious-media-player.org\n","mediaplayer")) static const char *xmms_lib_names[]

Referenced by KVSO_CLASS_FUNCTION().

#define CHECK_INTERNAL_POINTER (   __pointer)
Value:
if(!__pointer) \
{ \
c->error(__tr2qs_ctx("Internal error: no valid pointer for this object", "objects")); \
return false; \
}
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
audacious __tr2qs_ctx("An interface for the UNIX Audacious media player.\n""Download it from http://audacious-media-player.org\n","mediaplayer")) static const char *xmms_lib_names[]

Referenced by KvsObject_http::functionAbort(), KvsObject_http::functionCurrentId(), KvsObject_http::functionErrorString(), KvsObject_http::functionGet(), KvsObject_http::functionPost(), KvsObject_http::functionReadAll(), KvsObject_http::functionSetHost(), KvsObject_http::functionSetProxy(), KvsObject_http::functionSetUser(), and KVSO_CLASS_FUNCTION().

#define KVSO_BEGIN_CONSTRUCTOR (   __className,
  __baseClass 
)
Value:
__className::__className(KviKvsObjectClass * pClass, KviKvsObject * pParent, const QString & szName) \
: __baseClass(pClass, pParent, szName) \
{
Definition: KviKvsObject.h:50
Definition: KviKvsObjectClass.h:49
#define KVSO_BEGIN_DESTRUCTOR (   __className)
Value:
__className::~__className() \
{
#define KVSO_BEGIN_REGISTERCLASS (   __className,
  __stringName,
  __baseClass 
)
Value:
static KviKvsObjectClass * g_pKvs##__className##Class = 0; \
static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass, KviKvsObject * pParent, const QString & szName) \
{ \
return new __className(pClass, pParent, szName); \
} \
void __className::unregisterSelf() \
{ \
delete g_pKvs##__className##Class; \
g_pKvs##__className##Class = 0; \
} \
void __className::registerSelf() \
{ \
KviKvsObjectClass * base = KviKvsKernel::instance()->objectController()->lookupClass(__baseClass); \
g_pKvs##__className##Class = new KviKvsObjectClass(base, __stringName, kvs_##__className##_createInstance, true);
KviKvsObjectClass * lookupClass(const QString &szClass, bool bBuiltinOnly=false)
Definition: KviKvsObjectController.cpp:206
Definition: KviKvsObject.h:50
Definition: KviKvsObjectClass.h:49
KviKvsObjectController * objectController()
Definition: KviKvsKernel.h:99
static KviKvsKernel * instance()
Definition: KviKvsKernel.h:93
#define KVSO_CLASS_FUNCTION (   __className,
  __functionName 
)    bool KvsObject_##__className::__functionName(KviKvsObjectFunctionCall * c)
#define KVSO_DECLARE_OBJECT (   __className)
Value:
__className(KviKvsObjectClass * pClass, KviKvsObject * pParent, const QString & szName); \
~__className(); \
static void registerSelf(); \
static void unregisterSelf();
Definition: KviKvsObject.h:50
Definition: KviKvsObjectClass.h:49
#define KVSO_END_CONSTRUCTOR (   __className)    }
#define KVSO_END_DESTRUCTOR (   __className)    }
#define KVSO_END_REGISTERCLASS (   __className)    }
#define KVSO_REGISTER_HANDLER (   __className,
  __szName,
  __proc 
)    g_pKvs##__className##Class->registerFunctionHandler(__szName, (KviKvsObjectFunctionHandlerProc)(KVI_PTR2MEMBER(__className::__proc)));
#define KVSO_REGISTER_HANDLER_BY_NAME (   __className,
  __szName 
)    g_pKvs##__className##Class->registerFunctionHandler(#__szName, (KviKvsObjectFunctionHandlerProc)(KVI_PTR2MEMBER(__className::__szName)));
#define KVSO_REGISTER_STANDARD_FALSERETURN_HANDLER (   __className,
  __szName 
)    g_pKvs##__className##Class->registerStandardFalseReturnFunctionHandler(__szName);
#define KVSO_REGISTER_STANDARD_NOTHINGRETURN_HANDLER (   __className,
  __szName 
)    g_pKvs##__className##Class->registerStandardNothingReturnFunctionHandler(__szName);
#define KVSO_REGISTER_STANDARD_TRUERETURN_HANDLER (   __className,
  __szName 
)    g_pKvs##__className##Class->registerStandardTrueReturnFunctionHandler(__szName);
#define SET_OBJECT (   __className)