RZLuaInstanceBase::RZLuaInstanceBase(lua_State *&state, std::string const &instance_name) : m_luaState(state), m_instanceName(instance_name) { LOG_CTOR("RZLuaInstanceBase(" << instance_name << ")"); lua_createtable(m_luaState, 0, 0); lua_pushstring(m_luaState, "__index"); lua_pushvalue(m_luaState, -2); lua_settable(m_luaState, -3); lua_pushstring(m_luaState, "__newindex"); lua_pushvalue(m_luaState, -2); lua_settable(m_luaState, -3); lua_setglobal(m_luaState, m_instanceName.c_str()); }
/** @brief Construct a Product with values contained in a mysqlpp::Row @see mysqlpp::Row */ Product::Product(Row & aRow) : ManagedObject("products", aRow) { LOG_CTOR(); }
/** @brief Default constructor */ Product::Product() : ManagedObject("products") { LOG_CTOR(); }
/** @brief Class constructor */ Category::Category() : ManagedObject("categories") { LOG_CTOR(); }
/** @brief Construct an instance of Order with data fetched from the database @param[in] aRow An instance of mysqlpp::Row with data */ Order::Order(Row &aRow) : ManagedObject("orders", aRow) { LOG_CTOR(); _user = User::userByID(intForKey(KEY_ORD_UID)); }
/** @brief Default constructor */ Order::Order() : ManagedObject("orders") { LOG_CTOR(); _user = NULL; }