Files
envi-code/SourceCode/Code2026/tg_shs/inc/TArch/TAssocMsgContainer.h
T

46 lines
1.2 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
//------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2011, Beijing Tangent Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : TAssocMsgContainer类
2026-09-28 15:28:50 +08:00
// = Version : ver1.0
// = Author : xlc
// = CreateDate : 2011-06-20
2026-10-04 00:04:20 +08:00
// = Description: 关联消息容器类声明
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//------------------------------------------------------------------------+
#ifdef TASD
#ifndef _TASSOCMSGCONTAINER_H_
#define _TASSOCMSGCONTAINER_H_
#ifndef _TASSOCMSG_H_
#include "TAssocMsg.h"
#endif
typedef AcArray<TAssocMsg> TAssocMsgArray;
class TARCH_EXP TAssocMsgContainer
{
public:
TAssocMsgContainer();
virtual ~TAssocMsgContainer();
2026-10-04 00:04:20 +08:00
//添加消息
2026-09-28 15:28:50 +08:00
void AddMsg(const TAssocMsg& msg);
2026-10-04 00:04:20 +08:00
//移除指定索引的消息
2026-09-28 15:28:50 +08:00
void RemoveAt(int nIndex);
2026-10-04 00:04:20 +08:00
//移除指定消息
2026-09-28 15:28:50 +08:00
void Remove(const TAssocMsg& msg);
2026-10-04 00:04:20 +08:00
//清空消息
2026-09-28 15:28:50 +08:00
void RemoveAll();
2026-10-04 00:04:20 +08:00
//获得某一类型的消息
2026-09-28 15:28:50 +08:00
void GetTypeMsg(int nType, TAssocMsgArray& arMsg)const;
2026-10-04 00:04:20 +08:00
//获得指定索引的消息
2026-09-28 15:28:50 +08:00
bool GetMsg(int nIndex, TAssocMsg& msg)const;
2026-10-04 00:04:20 +08:00
//消息长度
2026-09-28 15:28:50 +08:00
int GetSize()const;
private:
2026-10-04 00:04:20 +08:00
TAssocMsgArray m_arAssocmsg; //关联消息容器
2026-09-28 15:28:50 +08:00
};
#endif
#endif