$#include "Resource/Resource.h" class Resource { bool Load(Deserializer& source); bool Save(Serializer& dest) const; tolua_outside bool ResourceLoad @ Load(const String& fileName); tolua_outside bool ResourceSave @ Save(const String& fileName) const; const String GetName() const; StringHash GetNameHash() const; unsigned GetMemoryUse() const; tolua_readonly tolua_property__get_set String name; tolua_readonly tolua_property__get_set StringHash nameHash; tolua_readonly tolua_property__get_set unsigned memoryUse; }; ${ static bool ResourceLoad(Resource* resource, const String& fileName) { return resource->LoadFile(fileName); } static bool ResourceSave(const Resource* resource, const String& fileName) { return resource->SaveFile(fileName); } $}