server/src/eressea/lua/objects.h
Enno Rehling b63200adf9 Eressea can now be compiled and debugged with Eclipse CDT
Several changes to config.h mean that I probably broke compilation on some platforms. That really needs cleaning up.
2008-04-20 14:48:15 +00:00

40 lines
766 B
C++

#ifndef LUA_OBJECTS_H
#define LUA_OBJECTS_H
#include <attributes/object.h>
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4127)
#endif
#include <luabind/object.hpp>
#ifdef _MSC_VER
#pragma warning (pop)
#endif
struct lua_State;
namespace eressea {
class objects {
public:
objects(struct attrib ** attribs) : mAttribPtr(attribs) {}
luabind::object get(const char * name);
// void set(const char * name, int type, luabind::object& value);
template <class V, object_type T> void
set(const char * name, V value);
private:
struct attrib ** mAttribPtr;
};
template<class T> eressea::objects
get_objects(const T& parent)
{
return eressea::objects(&const_cast<attrib *&>(parent.attribs));
}
};
#endif