git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1469 353e56fe-9613-0410-8469-b96ad8e6f29c
38 lines
No EOL
657 B
C++
38 lines
No EOL
657 B
C++
#include "PlatformPrecomp.h"
|
|
#include "ScriptAccelerator.h"
|
|
#include "util/MiscUtils.h"
|
|
|
|
ScriptAccelerator::ScriptAccelerator()
|
|
{
|
|
}
|
|
|
|
ScriptAccelerator::~ScriptAccelerator()
|
|
{
|
|
}
|
|
|
|
void ScriptAccelerator::Kill()
|
|
{
|
|
m_data.clear();
|
|
}
|
|
|
|
void ScriptAccelerator::AddPosition(string label, int current)
|
|
{
|
|
label = ToUpperCaseString(label);
|
|
m_data[label] = ScriptPosition(current);
|
|
}
|
|
|
|
ScriptPosition * ScriptAccelerator::GetPositionByName( string label )
|
|
{
|
|
label = ToUpperCaseString(label);
|
|
|
|
ScriptMap::iterator itor = m_data.find(label);
|
|
|
|
if (itor != m_data.end())
|
|
{
|
|
//bingo!
|
|
return &(itor->second);
|
|
}
|
|
|
|
return NULL;
|
|
|
|
} |