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

📄 datastorage.h

📁 游戏框架
💻 H
字号:
// ***************************************************************
//  DataStorage   version:  1.0
//  -------------------------------------------------------------
//	File Name:	DataStorage.h
//	Created:	2007/07/18
//	Modified:	2007/07/18   16:47
//	Author:		William.Liang
//  Msn:		lwq49@msn.com
//  Email:		lwq49@21cn.com, lwq49@msn.com
//	Description:
//
//	Purpose:	
//  -------------------------------------------------------------
//  license:
//
//  The contents of this file are subject to the Mozilla Public
//  License Version 1.1 (the "License"); you may not use this file
//  except in compliance with the License. You may obtain a copy
//  of the License at http://www.mozilla.org/MPL/ Software dis-
//  tributed under the License is distributed on an "AS IS" 
//  basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
//  plied. See the License for the specific language governing
//  rights and limitations under the License.
//
//  The Initial Developer of the Original Code is William.Liang .
//  Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef DATA_STORAGE_HEAD_FILE
#define DATA_STORAGE_HEAD_FILE

#include "ComService.h"
#include <time.h>

#pragma once

//////////////////////////////////////////////////////////////////////////

//***************************************************************
//	数据存储类
//
//  采用循环单向链表方式记录多个数据记录
//***************************************************************
class COM_SERVICE_CLASS CDataStorage
{
	//数据变量
protected:
	DWORD							m_dwDataSize;						//数据大小
	DWORD							m_dwBufferSize;						//缓冲区长度
	DWORD							m_dwInsertPos;						//数据插入位
	DWORD							m_dwTerminalPos;					//数据结束位
	DWORD							m_dwDataQueryPos;					//数据查询位
	DWORD							m_dwDataPacketCount;				//数据包数目
	BYTE							* m_pDataStorageBuffer;				//数据指针

	//函数定义
public:
	//构造函数
	CDataStorage(void);
	//析构函数
	virtual ~CDataStorage(void);

	//功能函数
public:
	//负荷信息
	bool GetBurthenInfo(tagBurthenInfo & BurthenInfo);
	//插入数据
	bool AddData(WORD wIdentifier, void * const pBuffer, WORD wDataSize);
	//获取数据
	bool GetData(tagDataHead & DataHead, void * pBuffer, WORD wBufferSize);
	//删除数据
	void RemoveData(bool bFreeMemroy);
};

//////////////////////////////////////////////////////////////////////////

#endif

⌨️ 快捷键说明

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