globtbl.h
来自「在手机操作系统symbina上使用的一个脚本扩展语言的代码实现,可以参考用于自己」· C头文件 代码 · 共 49 行
H
49 行
// GLOBTBL.H
//
// Copyright (c) 1997-1999 Symbian Ltd. All rights reserved.
//
#ifndef GLOBTBL_H
#define GLOBTBL_H
#include <e32base.h>
const TInt KMaxGlobalName=32;
const TInt KGlobalTblSize=16;
class TOplGlobal
{
public:
TOplGlobal(const TBufC<KMaxGlobalName> aName,const TInt aType,const TAny* aPtr);
private:
TSglQueLink iLink;
TBufC<KMaxGlobalName> iName;
TInt iType;
const TAny* iPtr;
friend class CGlobalsTbl;
};
class CGlobalsTbl : public CBase
{
public:
CGlobalsTbl();
~CGlobalsTbl();
void AddL(const TBufC<KMaxGlobalName>& aName,const TInt aType,const TAny* aPtr);
void Remove(const TBufC<KMaxGlobalName>& aName);
const TAny* Find(const TBufC<KMaxGlobalName>& aName,const TInt aType);
void PrepareToAddC();
private:
static void RemoveAddedGlobals(TAny* aGlobalsTbl);
TOplGlobal* iListMark[KGlobalTblSize];
private:
TInt GetHashValue(const TBufC<KMaxGlobalName>& aName);
TSglQue<TOplGlobal> iList[KGlobalTblSize];
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?