Script: Replaced ReadString/ReadNumber with GetOption/GetNumberOption.

This commit is contained in:
Birunthan Mohanathas
2012-03-11 09:59:48 +00:00
parent db05adaf2b
commit 63c42fe3a5
4 changed files with 50 additions and 56 deletions

View File

@ -40,19 +40,6 @@ static int GetOption(lua_State* L)
CMeterWindow* meterWindow = self->GetMeterWindow();
CConfigParser& parser = meterWindow->GetParser();
std::wstring strTmp = LuaManager::ToWide(L, 2);
strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), L"");
LuaManager::PushWide(L, strTmp.c_str());
return 1;
}
static int ReadString(lua_State* L)
{
CMeasure* self = GetSelf(L);
CMeterWindow* meterWindow = self->GetMeterWindow();
CConfigParser& parser = meterWindow->GetParser();
std::wstring strTmp = LuaManager::ToWide(L, 2);
strTmp = parser.ReadString(self->GetName(), strTmp.c_str(), LuaManager::ToWide(L, 3).c_str());
@ -60,7 +47,7 @@ static int ReadString(lua_State* L)
return 1;
}
static int ReadNumber(lua_State* L)
static int GetNumberOption(lua_State* L)
{
CMeasure* self = GetSelf(L);
CMeterWindow* meterWindow = self->GetMeterWindow();
@ -151,8 +138,7 @@ void LuaManager::RegisterMeasure(lua_State* L)
{
{ "GetName", GetName },
{ "GetOption", GetOption },
{ "ReadString", ReadString },
{ "ReadNumber", ReadNumber },
{ "GetNumberOption", GetNumberOption },
{ "Disable", Disable },
{ "Enable", Enable },
{ "GetValue", GetValue },