#include "StdAfx.h"
#include "ActionMap.h"
namespace Sunlight
{
namespace DirectX
{
namespace Input
{
ActionMap::Entry::Entry() :
ID(0),
Semantic(Actions::None),
Name(NULL)
{
}
ActionMap::Entry::Entry(int nID, Actions nSemantic, String *pName) :
ID(nID),
Semantic(nSemantic),
Name(pName)
{
}
ActionMap::ActionMap(void)
{
}
ActionMap::~ActionMap(void)
{
}
void ActionMap::Add(Entry *EntryObject)
{
List->Add(EntryObject);
}
void ActionMap::Remove(int index)
{
if ((index > (Count - 1)) || (index < 0))
throw new ArgumentOutOfRangeException(S"index");
List->RemoveAt(index);
}
ActionMap::Entry *ActionMap::Item(int index)
{
#ifdef __DEBUG
return __try_cast<Entry *>(List->get_Item(index));
#else
return static_cast<Entry *>(List->get_Item(index));
#endif
}
}
}
}