1 Star 0 Fork 3

411592004/DesignPatternInC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Chessman.h 764 Bytes
一键复制 编辑 原始数据 按行查看 历史
GoodmanTao 提交于 2019-04-21 22:37 +08:00 . init
#include <apr_pools.h>
#include "Memento.h"
#ifndef CHESSMAN_H
#define CHESSMAN_H
typedef struct Chessman_Fld Chessman_Fld;
typedef struct Chessman Chessman;
struct Chessman
{
Chessman_Fld *pFld;
char *(* GetLabel)(Chessman *pInst, apr_pool_t *pPool);
void (* SetLabel)(Chessman *pInst, const char *pLabel);
int (* GetX)(Chessman *pInst);
void (* SetX)(Chessman *pInst, int nX);
int (* GetY)(Chessman *pInst);
void (* SetY)(Chessman *pInst, int nY);
Memento *(* Save)(Chessman *pInst, apr_pool_t *pPool, Memento *pOut);
void (* Restore)(Chessman *pInst, Memento *pMemento);
};
Chessman *Chessman_New(apr_pool_t *pSupPool, const char *pLabel, int nX, int nY);
void Chessman_Free(Chessman **ppInst);
#endif // !CHESSMAN_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/bailingniao_760/DesignPatternInC.git
git@gitee.com:bailingniao_760/DesignPatternInC.git
bailingniao_760
DesignPatternInC
DesignPatternInC
master

搜索帮助