mylist.h
来自「在代码中演示使用C++开发的BREW端方便的程序 非常值得初学者学习.」· C头文件 代码 · 共 60 行
H
60 行
// List.h: interface for the CList class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(_LIST_H_)
#define _LIST_H_
#include "AEEStdLib.h"
#include "myShape.h"
class CList
{
private:
struct CNode
{
CNode(CShape *ps)
{
dat = ps;
next = NULL;
}
~CNode()
{
delete dat;
next = NULL;
}
void* operator new(size_t sz)
{
return MALLOC(sz);
}
void operator delete(void *p)
{
FREE(p);
}
CShape *dat;
CNode *next;
private:
// prohibited operations
CNode();
CNode(const CNode&);
CNode& operator=(const CNode&);
};
CNode *m_pFront;
// prohibited operations
CList(const CList& rhs);
CList& operator=(const CList& rhs);
public:
void operator delete(void *p);
void* operator new(size_t sz);
boolean update(IShell *pIShell);
CList();
boolean insert(CShape *ps);
boolean mt();
~CList();
};
#endif // !defined(_LIST_H_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?