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


C++ CContainer::SenderGet方法代码示例

本文整理汇总了C++中CContainer::SenderGet方法的典型用法代码示例。如果您正苦于以下问题:C++ CContainer::SenderGet方法的具体用法?C++ CContainer::SenderGet怎么用?C++ CContainer::SenderGet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CContainer的用法示例。


在下文中一共展示了CContainer::SenderGet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Recall


//.........这里部分代码省略.........
              1) get the recipient from the TLS-session
              2) resend all message ids for this sender starting with the given message-id
 */
            if ( g_bVerbose) cout << " * list partial, beginning with '" << itQuery->second << "'\n";
            for ( it = g_oContainerMapByCLUID.find(itQuery->second); it != g_oContainerMapByCLUID.end(); ++it )
              {
              *poSocket << it->first << "\n";
              }
            break;
          case 'm': // l:m list mine (sent by me)
            if ( g_bVerbose) cout << " * list mine\n";
/*
              1) get the recipient from the TLS-session
              2) resend all message ids from this sender
 */
            break;
          case 'y': // l:y list mine part, beginning with message-id
            if ( g_bVerbose) cout << " * list mine partial, beginning with '" << itQuery->second << "'\n";
/*
              1) get the recipient from the TLS-session
              2) resend all message ids from this sender starting at the given message-id
 */
            break;
          case 's': // l:s list senders
            if ( g_bVerbose) cout << " * list senders\n";
/*
              1) get the recipient from the TLS-session
              2) resend all senders with messages for this recipients
 */
            typedef map<string, bool> CMapString2Bool;
            CMapString2Bool omSenders;
            for ( it = g_oContainerMapByCLUID.begin(); it != g_oContainerMapByCLUID.end(); ++it )
              {
              omSenders[ it->second->SenderGet() ] = true;
              }
            for ( CMapString2Bool::iterator itSenders = omSenders.begin(); itSenders != omSenders.end(); ++itSenders )
              {
              *poSocket << itSenders->first << "\n";
              }
            break;
          } // switch ( itQuery->first[2] )
        break; // switch ( itQuery->first[0] ) => case 'l'

      case 'c': // call operations
        CContainer*          poc;
        CContainer::iterator itc;
        switch ( itQuery->first[2] )
          {
          case 'a': // c:a = call all
            if ( g_bVerbose) cout << " * recall all for me\n";
/*
              1) get the recipient from the TLS-session
              2) resend all messages for the recipient
 */
            for ( it = g_oContainerMapByCLUID.begin(); it != g_oContainerMapByCLUID.end(); ++it )
              {
              poc = it->second;

              *poSocket << string(1, CContainer::scn_sender)  << ":" << poc->SenderGet() << "\n";
              *poSocket << it->first                          << "\n";

              for ( itc  = poc->begin(); itc != poc->end(); ++itc )
                {
                *poSocket << *itc << "\n";
                } // for ( CContainer::iterator itc  = poc->begin();
              } // for ( it = g_oContainerMapByCLUID.begin(); ...
开发者ID:fmorgner,项目名称:flow,代码行数:67,代码来源:partner.cpp


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