Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

double PlanReader_Lua::getNumber ( const std::string &  name ) [private]

Get the value of the named global from the Lua environment

Definition at line 123 of file planreader_lua.cpp.

{
      lua_getglobal(L.State(), name.c_str());
      if (!lua_isnumber(L.State(), -1))
      {
            std::string errString = name + " is non-number";
            throw std::runtime_error(errString.c_str());
      }
      double d = lua_tonumber(L.State(), -1);
      lua_pop(L.State(), 1);
      return d;
}

Generated by  Doxygen 1.6.0   Back to index