forked from github/server
b63200adf9
Several changes to config.h mean that I probably broke compilation on some platforms. That really needs cleaning up.
40 lines
766 B
C++
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
|
|
|