本文整理汇总了C++中OutputMessage_ptr::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputMessage_ptr::Reset方法的具体用法?C++ OutputMessage_ptr::Reset怎么用?C++ OutputMessage_ptr::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputMessage_ptr
的用法示例。
在下文中一共展示了OutputMessage_ptr::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: configureOutputMessage
void OutputMessagePool::configureOutputMessage(OutputMessage_ptr msg, Protocol* protocol, bool autosend)
{
TRACK_MESSAGE(msg);
msg->Reset();
if(autosend)
{
msg->setState(OutputMessage::STATE_ALLOCATED);
m_autoSendOutputMessages.push_back(msg);
}
else
msg->setState(OutputMessage::STATE_ALLOCATED_NO_AUTOSEND);
Connection_ptr connection = protocol->getConnection();
assert(connection != NULL);
msg->setProtocol(protocol);
protocol->addRef();
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Adding reference to protocol - " << protocol << std::endl;
#endif
msg->setConnection(connection);
connection->addRef();
#ifdef __DEBUG_NET_DETAIL__
std::cout << "Adding reference to connection - " << connection << std::endl;
#endif
msg->setFrame(m_frameTime);
}
示例2: configureOutputMessage
void OutputMessagePool::configureOutputMessage(OutputMessage_ptr msg, Protocol* protocol, bool autosend)
{
msg->Reset();
if (autosend) {
msg->setState(OutputMessage::STATE_ALLOCATED);
m_autoSendOutputMessages.push_back(msg);
} else {
msg->setState(OutputMessage::STATE_ALLOCATED_NO_AUTOSEND);
}
Connection_ptr connection = protocol->getConnection();
assert(connection);
msg->setProtocol(protocol);
protocol->addRef();
msg->setConnection(connection);
connection->addRef();
msg->setFrame(m_frameTime);
}