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

一些常用的宏定义/枚举/和函数 更多...

#include <config_giveda.h>
#include <gConstDefine.h>
#include <gCtrlDllSym.h>
#include <string.h>
#include <stdint.h>

命名空间

 Giveda
 

宏定义

#define G_UNUSED(a)   (a)=(a)
 未使用的变量在编译时会造成编译器警告,使用此宏来解决编译器警告 更多...
 
#define SAFE_DELETE(p)   if( p ) { delete p; p = NULL; }
 很方便地delete 对象 更多...
 
#define G_DISABLE_COPY_1(Class)
 在ANSI c++标准下,使用此宏去禁用拷贝构造函数 更多...
 
#define G_DISABLE_COPY(Class, BClass)
 在ANSI c++标准下,使用此宏去禁用拷贝构造函数 更多...
 
#define G_DISABLE_ASSIGN(Class)
 在ANSI c++标准下,使用此宏去禁用operator=函数 更多...
 
#define G_ASSERT(cond)   doNothing()
 

类型定义

typedef int16_t T_OFFSET
 

枚举

enum  Giveda::Key {
  Giveda::Key_Esc = 0x2000, Giveda::Key_Escape =Key_Esc, Giveda::Key_Backspace, Giveda::Key_BackSpace = Key_Backspace,
  Giveda::Key_Back =Key_Backspace, Giveda::Key_Enter, Giveda::Key_Return = Key_Enter, Giveda::Key_Left,
  Giveda::Key_Up, Giveda::Key_Right, Giveda::Key_Down, Giveda::Key_Home,
  Giveda::Key_Meta, Giveda::Key_Menu =Key_Meta, Giveda::Key_PageUp, Giveda::Key_Prior = Key_PageUp,
  Giveda::Key_PageDown, Giveda::Key_Next = Key_PageDown, Giveda::Key_F1, Giveda::Key_F2,
  Giveda::Key_F3, Giveda::Key_F4, Giveda::Key_F5, Giveda::Key_F6,
  Giveda::Key_F7, Giveda::Key_F8, Giveda::Key_F9, Giveda::Key_F10,
  Giveda::Key_F11, Giveda::Key_F12, Giveda::Key_F13, Giveda::Key_F14,
  Giveda::Key_F15, Giveda::Key_F16, Giveda::Key_F17, Giveda::Key_F18,
  Giveda::Key_F19, Giveda::Key_F20, Giveda::Key_F21, Giveda::Key_F22,
  Giveda::Key_F23, Giveda::Key_F24, Giveda::Key_Space = 0x20, Giveda::Key_Any = Key_Space,
  Giveda::Key_0 = 0x30, Giveda::Key_1 = 0x31, Giveda::Key_2 = 0x32, Giveda::Key_3 = 0x33,
  Giveda::Key_4 = 0x34, Giveda::Key_5 = 0x35, Giveda::Key_6 = 0x36, Giveda::Key_7 = 0x37,
  Giveda::Key_8 = 0x38, Giveda::Key_9 = 0x39, Giveda::Key_A = 0x41, Giveda::Key_B = 0x42,
  Giveda::Key_C = 0x43, Giveda::Key_D = 0x44, Giveda::Key_E = 0x45, Giveda::Key_F = 0x46,
  Giveda::Key_G = 0x47, Giveda::Key_H = 0x48, Giveda::Key_I = 0x49, Giveda::Key_J = 0x4a,
  Giveda::Key_K = 0x4b, Giveda::Key_L = 0x4c, Giveda::Key_M = 0x4d, Giveda::Key_N = 0x4e,
  Giveda::Key_O = 0x4f, Giveda::Key_P = 0x50, Giveda::Key_Q = 0x51, Giveda::Key_R = 0x52,
  Giveda::Key_S = 0x53, Giveda::Key_T = 0x54, Giveda::Key_U = 0x55, Giveda::Key_V = 0x56,
  Giveda::Key_W = 0x57, Giveda::Key_X = 0x58, Giveda::Key_Y = 0x59, Giveda::Key_Z = 0x5a,
  Giveda::Key_unknown = 0xffff
}
 
enum  Giveda::MouseButton { Giveda::NoButton = 0x00000000, Giveda::LeftButton = 0x00000001, Giveda::RightButton = 0x00000002, Giveda::MiddleButton = 0x00000004 }
 

函数

void doNothing (void)
 
template<typename T >
const T & gMin (const T &a, const T &b)
 
template<typename T >
const T & gMax (const T &a, const T &b)
 
int gRound (double d)
 
bool gIsNear0 (float f)
 

详细描述

一些常用的宏定义/枚举/和函数

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

宏定义说明

#define G_ASSERT (   cond)    doNothing()
#define G_DISABLE_ASSIGN (   Class)
值:
private: \
Class &operator=(const Class &) { return *this; }

在ANSI c++标准下,使用此宏去禁用operator=函数

#define G_DISABLE_COPY (   Class,
  BClass 
)
值:
private: \
Class(const Class & r) : BClass(r) {} \
Class &operator=(const Class &) { return *this; }

在ANSI c++标准下,使用此宏去禁用拷贝构造函数

#define G_DISABLE_COPY_1 (   Class)
值:
private: \
Class(const Class &) {} \
Class &operator=(const Class &) { return *this; }

在ANSI c++标准下,使用此宏去禁用拷贝构造函数

#define G_UNUSED (   a)    (a)=(a)

未使用的变量在编译时会造成编译器警告,使用此宏来解决编译器警告

#define SAFE_DELETE (   p)    if( p ) { delete p; p = NULL; }

很方便地delete 对象

类型定义说明

typedef int16_t T_OFFSET

函数说明

void doNothing ( void  )
bool gIsNear0 ( float  f)
template<typename T >
const T& gMax ( const T &  a,
const T &  b 
)
inline
template<typename T >
const T& gMin ( const T &  a,
const T &  b 
)
inline
int gRound ( double  d)