Giveda® Embedded Midware  1.2.0
本文档受《版权法》、《版权公约》保护。深圳技达®版权所有
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
| 宏定义 | 枚举
gObject_cpp11.h 文件参考

使用c++11实现的 GObject 更多...

#include <config_giveda.h>
#include <gGlobal.h>
#include <gEvent.h>
#include <string.h>
#include <string>
#include <cxxabi.h>
#include <stdlib.h>
#include <list>

class  GSlotAPI< F >
 
class  GSlotAPI< Ret(Args...)>
 
class  GSlotCpp< Receiver, F >
 
class  GSlotCpp< Receiver, Ret(Args...)>
 
class  GSignal< F >
 GSignal 类用来定义信号,所述信号的函数类型为Ret (*)(Args...)。
比如:GSignal<void(int)> intSig;//定义一个函数类型为void intSig(int); 比如:GSignal<void(int, float)> ifSig;//定义一个函数类型为void ifSig(int, float);. 更多...
 
class  GSignal< Ret(Args...)>
 
class  GSlot
 
class  GObject
 GObject 几乎是这个世界中所有元素的基类和祖先。 更多...
 

宏定义

#define slots
 
#define signals   public
 
#define SIGNAL_TYPE(SlotFuncType)   list<GSlot*>
 
#define SIGNAL_POINTER(SlotFuncType)   list<GSlot*>*
 
#define SIGNAL_TYPE_ITERATOR(SlotFuncType)   list<GSlot*>::iterator
 
#define SET_CLASS_NAME(any_type)
 如果你要在运行期获得某个对象的类名,可以使用此宏定义 更多...
 

枚举

enum  E_SLOT_TYPE { C_SLOT_TYPE, CPP_SLOT_TYPE }
 

详细描述

使用c++11实现的 GObject

作者
明心
版本
1.0.0
日期
2019-2-6

宏定义说明

#define SET_CLASS_NAME (   any_type)
值:
public: \
virtual const char *className() const \
{ \
static string s_name; \
char* name = abi::__cxa_demangle(typeid(any_type).name(), NULL, NULL, NULL); \
s_name = name; \
free(name); \
return s_name.c_str(); \
}

如果你要在运行期获得某个对象的类名,可以使用此宏定义

#define SIGNAL_POINTER (   SlotFuncType)    list<GSlot*>*
#define SIGNAL_TYPE (   SlotFuncType)    list<GSlot*>
#define SIGNAL_TYPE_ITERATOR (   SlotFuncType)    list<GSlot*>::iterator
#define signals   public
#define slots

枚举类型说明

枚举值
C_SLOT_TYPE 
CPP_SLOT_TYPE