当前位置: 首页>>代码示例>>C++>>正文


C++ UList::Append方法代码示例

本文整理汇总了C++中UList::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ UList::Append方法的具体用法?C++ UList::Append怎么用?C++ UList::Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UList的用法示例。


在下文中一共展示了UList::Append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Sort

void Selection::Sort (GraphicView* views) {
/*
 * Note: this doesn't work if there are views in the selection from more than
 * one GraphicViews.
 */
    Iterator i;
    UList* cur;
    UList* newList = new UList;

    views->First(i);

    while (!views->Done(i) && !_ulist->IsEmpty()) {
        cur = _ulist->First();

        while (cur != _ulist->End()) {
            if (views->GetView(i) == View(cur)) {
                _ulist->Remove(cur);
                newList->Append(cur);
                break;
            } else {
                cur = cur->Next();
            }
        }
        views->Next(i);
    }
    if (!_ulist->IsEmpty()) {
        cerr << "warning: selection contained spurious element(s)\n";
    }
    delete _ulist;
    _ulist = newList;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:31,代码来源:selection.c

示例2: GetExtraConflict

void EditorComp::GetExtraConflict(GetConflictCmd* gcmd) {
    const char* cname = gcmd->GetCName();
    UList* conflictlist = gcmd->GetConflict();

    const char* curCtrl = _curCtrlVar->GetName();
    const char* key = _keymap->GetName();
    const char* select = _selection->GetName();
    
    const char* ctrl_sub = _curCtrlVar->GetSubclassName();
    const char* key_sub = _keymap->GetSubclass()->GetName();
    const char* sel_sub = _selection->GetSubclass()->GetName();
    
    if (strcmp(curCtrl, cname) == 0) {
        conflictlist->Append(new UList(_curCtrlVar->GetButtonSharedName()));
    }
    if (strcmp(key, cname) == 0) {
        conflictlist->Append(new UList(_keymap->GetMemberSharedName()));
    }
    if (strcmp(select, cname) == 0) {
        conflictlist->Append(new UList(_selection->GetMemberSharedName()));
    }
    if (strcmp(ctrl_sub, cname) == 0) {
        conflictlist->Append(
            new UList(_curCtrlVar->GetButtonSharedName()->GetSubclass())
        );
    }
    if (strcmp(key_sub, cname) == 0) {
        conflictlist->Append(new UList(_keymap->GetSubclass()));
    }
    if (strcmp(sel_sub, cname) == 0) {
        conflictlist->Append(new UList(_selection->GetSubclass()));
    }
    _igrcomps->Interpret(gcmd);
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:34,代码来源:ibeditor.c

示例3: Interpret

void DialogClass::Interpret(Command* cmd) {
    if (cmd->IsA(GETCONFLICT_CMD)) {
        GetConflictCmd* gcmd = (GetConflictCmd*) cmd;
        const char* cname = gcmd->GetCName();
        MonoSceneClass::Interpret(cmd);
        UList* conflictlist = gcmd->GetConflict();
        ButtonSharedName* bsnamer = _bsVar->GetButtonSharedName();
        const char* buttonname = bsnamer->GetName();
        const char* funcname = bsnamer->GetFuncName();
        if (strcmp(buttonname, cname) == 0 || strcmp(funcname, cname) == 0) {
            conflictlist->Append(new UList(bsnamer));
        }

    } else {
        MonoSceneClass::Interpret(cmd);
    }
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:17,代码来源:ibdialog.c


注:本文中的UList::Append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。