Esempio n. 1
0
int NodeLuaMetaData::OpenInLua(lua_State * L)
{
	luaL_getmetatable(L, METATABLENAME);
	if (lua_isnil(L, -1) != 1)
	{
		return 0; // Already loaded, DO NOT WASTE TIME DUMMY.
	}

	luaL_newmetatable(L, METATABLENAME); // create metaTable
	luaL_setfuncs(L, metaTableMethods, 0);

	luaL_newmetatable(L, MEMBERSPROPERTY_METATABLENAME);
	luaL_setfuncs(L, MembersProperty_MetaTableMethods, 0);

	//ScopeMemberLuaMetaData::OpenInLua(L);

	NodeListLuaMetaData::OpenInLua(L);
	lua_pop(L, 1);
	// 2009-10-31- Taking this out as it is EVIL!!
	// Causes some kind of memory corruption error:
	ElementLuaMetaData::OpenInLua(L);
	lua_pop(L, 1);

	// Creates or reuses a table called "Macaroni_File" and puts it in global
	// scope.
	MACARONI_LUA_REGISTER_FOR_RETURN(L, GLOBALTABLENAME, tableMethods);

	//FileNameLuaMetaData::OpenInLua(L);

	return 1;
}
Esempio n. 2
0
int BlockLuaMetaData::OpenInLua(lua_State * L)
{
	MACARONI_LUA_REGISTER_FOR_RETURN(L, GLOBALTABLENAME, tableMethods);
	return 1;
}