Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "StarSystem.h"
- class UncopyableSBodyPath : public SBodyPath, public DeleteEmitter {
- public:
- UncopyableSBodyPath(const SBodyPath &p) : SBodyPath(p), DeleteEmitter() {}
- };
- template <>
- class LuaSubObject<UncopyableSBodyPath> : public LuaSubObject< LuaSubObject<UncopyableSBodyPath> > {
- public:
- static inline LuaObject *PushToLua(SBodyPath *p) {
- UncopyableSBodyPath *up = new UncopyableSBodyPath(*p);
- delete p;
- return LuaSubObject<UncopyableSBodyPath>::PushToLua(up);
- }
- static inline LuaObject *PushToLuaGC(SBodyPath *p) {
- UncopyableSBodyPath *up = new UncopyableSBodyPath(*p);
- delete p;
- return LuaSubObject<UncopyableSBodyPath>::PushToLuaGC(up);
- }
- static inline SBodyPath *PullFromLua() {
- return dynamic_cast<SBodyPath*>(LuaSubObject<UncopyableSBodyPath>::PullFromLua());
- }
- };
- typedef LuaSubObject< LuaSubObject<UncopyableSBodyPath> > LuaSBodyPath;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement