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


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

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

示例2: handleMessages

void TeamDataProvider::handleMessages(MessageQueue& teamReceiver)
{
  if(theInstance)
    teamReceiver.handleAllMessages(*theInstance);

  teamReceiver.clear();
}
开发者ID:BADBDY23,项目名称:BHumanCodeRelease,代码行数:7,代码来源:TeamDataProvider.cpp

示例3: handleMessages

void TeamDataProvider::handleMessages(MessageQueue& teamReceiver)
{
  if(theInstance)
  {
    teamReceiver.handleAllMessages(*theInstance);
    TEAM_OUTPUT(idRobot, bin, theInstance->theRobotInfoBH.number);
  }

  teamReceiver.clear();
}
开发者ID:CheddarB,项目名称:nbites,代码行数:10,代码来源:TeamDataProvider.cpp


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