コード例 #1
0
/* static */
UIActionPool* UIActionPool::create(UIActionPoolType type)
{
    UIActionPool *pActionPool = 0;
    switch (type)
    {
        case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector; break;
        case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime; break;
        default: AssertFailedReturn(0);
    }
    AssertPtrReturn(pActionPool, 0);
    pActionPool->prepare();
    return pActionPool;
}
コード例 #2
0
/* static */
void UIActionPool::createTemporary(UIActionPoolType type)
{
    UIActionPool *pActionPool = 0;
    switch (type)
    {
        case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector(true); break;
        case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime(true); break;
        default: AssertFailedReturnVoid();
    }
    AssertPtrReturnVoid(pActionPool);
    pActionPool->prepare();
    pActionPool->cleanup();
    delete pActionPool;
}
コード例 #3
0
/* static */
void UIActionPool::createTemporary(UIActionPoolType type)
{
    UIActionPool *pHelperPool = 0;
    switch (type)
    {
        case UIActionPoolType_Selector: pHelperPool = new UIActionPoolSelector; break;
        case UIActionPoolType_Runtime: pHelperPool = new UIActionPoolRuntime; break;
        default: break;
    }
    if (pHelperPool)
    {
        pHelperPool->prepare();
        pHelperPool->cleanup();
        delete pHelperPool;
    }
}