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


C++ Serialiser::SerialiseBuffer方法代码示例

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


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

示例1: ReceiveMessage


//.........这里部分代码省略.........
      {
        string existingClient;
        ser->Serialise("", existingClient);

        SAFE_DELETE(ser);

        SAFE_DELETE(m_Socket);

        RDCLOG("Got busy signal: '%s", existingClient.c_str());
        msg->Type = eRemoteMsg_Busy;
        msg->Busy.ClientName = existingClient;
        return;
      }
      else if(type == ePacket_CopyCapture)
      {
        msg->Type = eRemoteMsg_CaptureCopied;

        ser->Serialise("", msg->NewCapture.ID);

        SAFE_DELETE(ser);

        msg->NewCapture.localpath = m_CaptureCopies[msg->NewCapture.ID];

        if(!RecvChunkedFile(m_Socket, ePacket_CopyCapture, msg->NewCapture.localpath.elems, ser, NULL))
        {
          SAFE_DELETE(ser);
          SAFE_DELETE(m_Socket);

          msg->Type = eRemoteMsg_Disconnected;
          return;
        }

        m_CaptureCopies.erase(msg->NewCapture.ID);

        SAFE_DELETE(ser);

        return;
      }
      else if(type == ePacket_NewChild)
      {
        msg->Type = eRemoteMsg_NewChild;

        ser->Serialise("", msg->NewChild.PID);
        ser->Serialise("", msg->NewChild.ident);

        RDCLOG("Got a new child process: %u %u", msg->NewChild.PID, msg->NewChild.ident);

        SAFE_DELETE(ser);

        return;
      }
      else if(type == ePacket_NewCapture)
      {
        msg->Type = eRemoteMsg_NewCapture;

        ser->Serialise("", msg->NewCapture.ID);
        ser->Serialise("", msg->NewCapture.timestamp);

        string path;
        ser->Serialise("", path);
        msg->NewCapture.localpath = path;

        if(!m_Local)
          msg->NewCapture.localpath = "";

        uint32_t thumblen = 0;
        ser->Serialise("", thumblen);

        create_array_uninit(msg->NewCapture.thumbnail, thumblen);

        size_t l = 0;
        byte *buf = &msg->NewCapture.thumbnail[0];
        ser->SerialiseBuffer("", buf, l);

        RDCLOG("Got a new capture: %d (time %llu) %d byte thumbnail", msg->NewCapture.ID,
               msg->NewCapture.timestamp, thumblen);

        SAFE_DELETE(ser);

        return;
      }
      else if(type == ePacket_RegisterAPI)
      {
        msg->Type = eRemoteMsg_RegisterAPI;

        ser->Serialise("", m_API);
        msg->RegisterAPI.APIName = m_API;

        RDCLOG("Used API: %s", m_API.c_str());

        SAFE_DELETE(ser);

        return;
      }
    }

    SAFE_DELETE(ser);

    msg->Type = eRemoteMsg_Noop;
  }
开发者ID:EecheE,项目名称:renderdoc,代码行数:101,代码来源:remote_access.cpp


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