-- $LastChangedDate: 2010-04-16 23:43:07 -0400 (Fri, 16 Apr 2010) $
-- Macros written in Lua to expand C++ code for bindings between C++/Lua.
-- Avoid lua_/LUA_ which is reserved by Lua.

bindTable = {

class = "ObserverCurrentCraft",
typesig = "TYPESIG_OBSERVER_CURRENT_CRAFT",
luaCanInstantiate = true,

headers =
[[
#include "base/module.hh"
using namespace base;
#include "view/module.hh"
#include "view/observer_current_craft.hh"
using namespace view;
]],

func_New = {
    comments = "ObserverCurrentCraft:New()",
    code = [[
        shptr<ObserverCurrentCraft> observerCurrentCraft = new ObserverCurrentCraft;
        return NEW_USERDATA_SHPTR<ObserverCurrentCraft>( L, observerCurrentCraft, BIND_METATABLE_NAME );
    ]]
},

func_Destroy = {
    comments = "Lua's garbage collector indirectly invokes this C++ destructor.",
    code = [[
        return DESTROY_USERDATA_SHPTR<ObserverCurrentCraft>( L, CheckTypesigObserverCurrentCraft );
    ]]
},

}
