本文整理汇总了C++中SequenceSet::front方法的典型用法代码示例。如果您正苦于以下问题:C++ SequenceSet::front方法的具体用法?C++ SequenceSet::front怎么用?C++ SequenceSet::front使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SequenceSet
的用法示例。
在下文中一共展示了SequenceSet::front方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: confirmed
void SessionHandler::confirmed(const SequenceSet& commands, const Array& /*fragments*/) {
checkAttached();
// Ignore non-contiguous confirmations.
if (!commands.empty() && commands.front() >= getState()->senderGetReplayPoint())
getState()->senderConfirmed(commands.rangesBegin()->last());
}
示例2: expected
void SessionHandler::expected(const SequenceSet& commands, const Array& /*fragments*/) {
checkAttached();
if (getState()->hasState()) { // Replay
if (commands.empty()) throw IllegalStateException(
QPID_MSG(getState()->getId() << ": has state but client is attaching as new session."));
// TODO aconway 2008-05-12: support replay of partial commands.
// Here we always round down to the last command boundary.
SessionPoint expectedPoint = commands.empty() ? SequenceNumber(0) : SessionPoint(commands.front(),0);
SessionState::ReplayRange replay = getState()->senderExpected(expectedPoint);
sendCommandPoint(expectedPoint);
std::for_each(replay.begin(), replay.end(), out); // replay
}
else
sendCommandPoint(getState()->senderGetCommandPoint());
}