key : hostID / value : inventory class 를 갖는 CFastMap의 구현에서 특정 key의 value값만 클리어 하고 싶을 때 코드를 어떻게 작성해야 하는지 문의 드립니다.
class CInventory
{
public:
CInventory(void) {}
~CInventory(void)
{
m_playerBoxList.Clear();
m_equipMentList.Clear();
}
public:
CFastList<CPlayerBox> m_playerBoxList;
CFastList<CEquipMentBox> m_equipMentList;
};
typedef RefCount<CInventory> CInventoryPtr;
typedef CFastMap<HostID, CInventoryPtr> RemoteInventory;
RemoteInventory m_remoteInventories;
...
CInventoryPtr Inven(new CInventory);
m_remoteInventories.Add(remote0, Inven);
m_remoteInventories.Add(remote1, Inven);
여기에서 remote1 자체를 삭제 하지 않고 remote1의 Inven만 삭제하고 새로 넣어주는 코드를 어떻게 구현해야 되나요?