#ifndef __LUAOCCI_H__ #define __LUAOCCI_H__ #include #include #include #define DECLARE_OCCI_ENCAP(clname) \ class EncapOCCI_##clname : public Base { \ public: \ EncapOCCI_##clname(oracle::occi::clname * _o) : o(_o) { } \ ~EncapOCCI_##clname() { } \ oracle::occi::clname * Get() { return o; } \ bool disableExceptions; \ String lastError_msg; \ int lastError_code; \ private: \ oracle::occi::clname * o; \ }; \ \ class LuaOCCI_##clname : public LuaObject { \ public: \ static void pushstatics(Lua *) throw (GeneralException); \ LuaOCCI_##clname(EncapOCCI_##clname * _o) : o(_o) { } \ ~LuaOCCI_##clname() { } \ private: \ virtual void pushmembers(Lua *); \ EncapOCCI_##clname * o; \ }; DECLARE_OCCI_ENCAP(Environment); DECLARE_OCCI_ENCAP(Connection); DECLARE_OCCI_ENCAP(Statement); DECLARE_OCCI_ENCAP(ResultSet); DECLARE_OCCI_ENCAP(Stream); #define LuaOCCI_pushstatics(L) {\ LuaOCCI_Environment::pushstatics(L);\ LuaOCCI_Connection::pushstatics(L);\ LuaOCCI_Statement::pushstatics(L);\ LuaOCCI_ResultSet::pushstatics(L);\ LuaOCCI_Stream::pushstatics(L);\ } #endif