本文整理汇总了C++中CommandList::size方法的典型用法代码示例。如果您正苦于以下问题:C++ CommandList::size方法的具体用法?C++ CommandList::size怎么用?C++ CommandList::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandList
的用法示例。
在下文中一共展示了CommandList::size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool operator==(const CommandList &l1, const CommandList &l2)
{
if (l1.size() != l2.size())
return false;
for (int i = 0; i < l1.size(); ++i)
if (!l1.commandAt(i)->equals(l2.commandAt(i).get()))
return false;
return true;
}
示例2: run
void CommandExec::run(CommandList& list, ZonePtr z) {
if (list.size() == 0) {
debugC(3, kDebugExec, "runCommands: nothing to do");
return;
}
_execZone = z;
debugC(3, kDebugExec, "runCommands starting");
runList(list.begin(), list.end());
debugC(3, kDebugExec, "runCommands completed");
}
示例3: Launch
int WebBrowserLauncher::Launch()
{
PowerManagement::DKPowerManagerImpl::GetInstance()->AccquireLock(PM_LOCK_SCREEN, MODULE_WEBBROWSER);
CommandList args = WebBrowserLauncher::GetInstance()->GetCurrentCommand();
std::string command_str = WebBrowserBin;
for (int i = 0; i < args.size(); ++i)
{
command_str.append(" ")
.append(args[i]);
}
// qws postfix
command_str.append(" -qws");
int err = ThreadHelper::CreateThread(&m_pThread,
WebBrowserThread,
(void*)(command_str.c_str()),
"WebBrowserLauncher @ WebBrowserThread",
true,
51200,
SQM_THREAD_PRIORITY);
//DebugPrintf(DLC_DIAGNOSTIC, "WebBrowserLauncher::WebBrowserThread %d#, err(%d)", m_pThread, err);
if (err != 0)
{
PowerManagement::DKPowerManagerImpl::GetInstance()->ReleaseLock(PM_LOCK_SCREEN, MODULE_WEBBROWSER);
WebBrowserLauncher::m_pThread = 0;
// Notify message thread that web browser has stopped.
SNativeMessage msg;
msg.iType = KMessageWebBrowserStop;
CNativeThread::Send(msg);
DebugPrintf(DLC_DIAGNOSTIC, "Launching web browser failed, send top message");
return err;
}
return 0;
}