Esempio n. 1
0
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());
}
Esempio n. 2
0
/**
   @brief Construct a Product with values contained in a 
          mysqlpp::Row
 
   @see mysqlpp::Row
 */
Product::Product(Row & aRow) : ManagedObject("products", aRow)
{
    LOG_CTOR();
}
Esempio n. 3
0
/**
   @brief Default constructor
 */
Product::Product() : ManagedObject("products")
{
    LOG_CTOR();
}
Esempio n. 4
0
/**
   @brief Class constructor
 */
Category::Category() : ManagedObject("categories")
{
    LOG_CTOR();
}
Esempio n. 5
0
File: Order.cpp Progetto: unixo/SENG
/**
   @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));
}
Esempio n. 6
0
File: Order.cpp Progetto: unixo/SENG
/**
   @brief Default constructor
 */
Order::Order() : ManagedObject("orders")
{
    LOG_CTOR();
    _user = NULL;
}