本文整理汇总了C++中ActionList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionList::clear方法的具体用法?C++ ActionList::clear怎么用?C++ ActionList::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionList
的用法示例。
在下文中一共展示了ActionList::clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clear
void clear()
{
for(unsigned int k=0; k<actions.size();k++)
{
ActionItem *ret=actions.at(k);
delete ret;
}
actions.clear();
}
示例2: enumerateActionList
void SGModel::enumerateActionList(ActionList &actions)
{
const Model::AnimationData &animation = mModel->getAnimationData();
auto itr = animation.begin();
actions.clear();
while (itr != animation.end())
{
ActionInfo action;
ActionDataPtr actionData = smart_pointer_cast<ActionData>(itr->second);
action.mName = actionData->mName;
++itr;
}
}
示例3: GetActionList
const CKeyBindings::ActionList& CKeyBindings::GetActionList(const CKeyChain& kc) const
{
static ActionList out; //FIXME switch to thread_local when all buildbots are using >=gcc4.7
out.clear();
if (kc.empty())
return out;
const CKeyBindings::ActionList& al = GetActionList(kc.back());
for (const Action& action: al) {
if (kc.fit(action.keyChain))
out.push_back(action);
}
return out;
}
示例4: readAction
void Resource::readAction(Common::File *file, ActionList &list) {
list.clear();
while (file->readByte() == 1) {
list.push_back(Action());
Action &action = list.back();
action._actionType = (ActionType)file->readSint16LE();
action._param1 = file->readSint16LE();
action._param2 = file->readSint16LE();
action._param3 = file->readSint16LE();
if (action._actionType == kActionShowMessages) {
action._messages.reserve(action._param1);
for (int i = 0; i < action._param1; i++)
action._messages.push_back(readString(file));
} else {
action._messages.push_back(readString(file));
}
}
}