You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
607 B
C++

#pragma once
#include "SmartPtr.h"
#include "WorkCmd.h"
//保存当前要执行的指令(全局)
class CWorkCmdContainer
{
public:
CWorkCmdContainer(void);
~CWorkCmdContainer(void);
static CWorkCmdContainer &GetInstance(){return m_Instance;};
void AddCmd(CWorkCmd *p);
int GetCmdCnt(){return m_WorkCmdVec.size();};//指令的数量
vector<Sptr<CWorkCmd>> &GetContainer(){return m_WorkCmdVec;};
void Clear(){m_WorkCmdVec.clear();};
private:
static CWorkCmdContainer m_Instance;
vector<Sptr<CWorkCmd>> m_WorkCmdVec;//工作指令容器
};