⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myobjcollection.h

📁 实现撤销和恢复功能得远吗
💻 H
字号:
// MyObjCollection.h: interface for the CMyObjCollection class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYOBJCOLLECTION_H__CDA14E19_C313_414A_A956_86FE349BEF95__INCLUDED_)
#define AFX_MYOBJCOLLECTION_H__CDA14E19_C313_414A_A956_86FE349BEF95__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// 使用STL列表
#include <vector>
using namespace std;

#include "MyObject.h"

class CMyObjCollection  
{
private:
	vector<CMyObject*>  m_vecMyObjects;

public:
	CMyObjCollection();
	virtual ~CMyObjCollection();

// 属性
public:
	int getCount();
	CMyObject* getItem(int index);
	bool IsEmpty();

// 方法
public:
	void Add(CMyObject* pItem);
	void Remove(CMyObject* pItem);
	void RemoveAt(int index);
	void Clear();
	bool Contains(CMyObject* pItem);
	int Find(CMyObject* pItem);

// 操作
public:
	CMyObject* operator [] (int index);
};

#endif // !defined(AFX_MYOBJCOLLECTION_H__CDA14E19_C313_414A_A956_86FE349BEF95__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -