コード例 #1
0
ファイル: RZLuaInstance.cpp プロジェクト: rozetti/RZQLua
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());
}
コード例 #2
0
ファイル: Product.cpp プロジェクト: unixo/SENG
/**
   @brief Construct a Product with values contained in a 
          mysqlpp::Row
 
   @see mysqlpp::Row
 */
Product::Product(Row & aRow) : ManagedObject("products", aRow)
{
    LOG_CTOR();
}
コード例 #3
0
ファイル: Product.cpp プロジェクト: unixo/SENG
/**
   @brief Default constructor
 */
Product::Product() : ManagedObject("products")
{
    LOG_CTOR();
}
コード例 #4
0
ファイル: Category.cpp プロジェクト: unixo/SENG
/**
   @brief Class constructor
 */
Category::Category() : ManagedObject("categories")
{
    LOG_CTOR();
}
コード例 #5
0
ファイル: Order.cpp プロジェクト: 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));
}
コード例 #6
0
ファイル: Order.cpp プロジェクト: unixo/SENG
/**
   @brief Default constructor
 */
Order::Order() : ManagedObject("orders")
{
    LOG_CTOR();
    _user = NULL;
}