本文整理汇总了C++中MessageQueue::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageQueue::clear方法的具体用法?C++ MessageQueue::clear怎么用?C++ MessageQueue::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageQueue
的用法示例。
在下文中一共展示了MessageQueue::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
/*
* Process Any Waiting Decided Data
* Push to the Parser for Display
*/
void SequenceManager::update()
{
//std::cout << "SequenceManager upadate() " << std::endl;
if(TheQueueManager::Instance()->m_queue.isEmpty())
return;
/*
* Loop the Queue and Send all decoded data
* Through to be parsed and displayed.
*/
MessageQueue msgQueue;
while(!TheQueueManager::Instance()->m_queue.isEmpty())
{
msgQueue = std::move(TheQueueManager::Instance()->m_queue.dequeue());
if(msgQueue.m_text.empty())
{
// Make Sure Vector is not Empty!
if(msgQueue.m_queueParams.size() > 0)
{
TheSequenceParser::Instance()->sequenceInput(
msgQueue.m_queueParams);
}
}
else
{
TheSequenceParser::Instance()->textInput(
msgQueue.m_text);
}
msgQueue.clear();
}
/*
* Render The final screen data
* 1. Copy Surface to Texture
* 2. Render the Texture to Monitor.
*/
TheRenderer::Instance()->renderScreen();
TheRenderer::Instance()->drawTextureScreen();
// When no data received, this is when we want to show the cursor!
// Setup cursor in current x/y position Cursor. after getting
// New Data Received.
if (TheSequenceParser::Instance()->isCursorActive())
{
TheRenderer::Instance()->setupCursorChar();
TheRenderer::Instance()->renderCursorOnScreen();
TheRenderer::Instance()->drawTextureScreen();
}
// Clear And Move on.
msgQueue.clear();
}
示例2: handleMessages
void TeamDataProvider::handleMessages(MessageQueue& teamReceiver)
{
if(theInstance)
teamReceiver.handleAllMessages(*theInstance);
teamReceiver.clear();
}
示例3: handleMessages
void TeamDataProvider::handleMessages(MessageQueue& teamReceiver)
{
if(theInstance)
{
teamReceiver.handleAllMessages(*theInstance);
TEAM_OUTPUT(idRobot, bin, theInstance->theRobotInfoBH.number);
}
teamReceiver.clear();
}