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


C++ ActionList::clear方法代码示例

本文整理汇总了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();
 }
开发者ID:robotology,项目名称:icub-main,代码行数:9,代码来源:main.cpp

示例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;
        }
    }
开发者ID:asnwerear,项目名称:Tiny3D,代码行数:14,代码来源:T3DSGModel.cpp

示例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;
}
开发者ID:spring,项目名称:spring,代码行数:15,代码来源:KeyBindings.cpp

示例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));
		}
	}
}
开发者ID:ScummQuest,项目名称:scummvm,代码行数:21,代码来源:resource.cpp


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