46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
//------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2011, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TAssocMsgContainer类
|
|
// = Version : ver1.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2011-06-20
|
|
// = Description: 关联消息容器类声明
|
|
// = 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();
|
|
|
|
//添加消息
|
|
void AddMsg(const TAssocMsg& msg);
|
|
//移除指定索引的消息
|
|
void RemoveAt(int nIndex);
|
|
//移除指定消息
|
|
void Remove(const TAssocMsg& msg);
|
|
//清空消息
|
|
void RemoveAll();
|
|
//获得某一类型的消息
|
|
void GetTypeMsg(int nType, TAssocMsgArray& arMsg)const;
|
|
//获得指定索引的消息
|
|
bool GetMsg(int nIndex, TAssocMsg& msg)const;
|
|
//消息长度
|
|
int GetSize()const;
|
|
|
|
private:
|
|
TAssocMsgArray m_arAssocmsg; //关联消息容器
|
|
};
|
|
#endif
|
|
#endif |