MyList.h
资源名称:Shapes.zip [点击查看]
上传用户:wenshuihe
上传日期:2007-01-14
资源大小:10k
文件大小:1k
源码类别:
BREW编程
开发平台:
Visual C++
- // 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_)