本文整理汇总了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;
}
示例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);
}
示例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);
}
}