本文整理汇总了C++中StrSeq::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ StrSeq::empty方法的具体用法?C++ StrSeq::empty怎么用?C++ StrSeq::empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StrSeq
的用法示例。
在下文中一共展示了StrSeq::empty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getWithFilter
FeedMetaSeq UserFeedsI::getWithFilter(const IntSeq& userids, ::Ice::Int begin, ::Ice::Int limit, const StrSeq& filter, const ::Ice::Current& current) {
ostringstream oss;
oss << "UserFeedsI::getWithFilter, userids.size: " << userids.size() << " begin: " << begin << " limit: " << limit;
TimeCost tm = TimeCost::create(oss.str(), TimeCost::LOG_LEVEL_INFO);
if(filter.empty())
return getSegment(fs_.gets(userids, begin + limit), userids, begin, limit);
return getSegment(fs_.gets_with_filter(userids, TypesFilter(std::vector<int>()), IdsFilter(filter), begin + limit), userids, begin, limit);
}
示例2: getByTypesWithFilter
FeedMetaSeq UserFeedsI::getByTypesWithFilter(const IntSeq& userids, ::Ice::Int begin, ::Ice::Int limit,
const IntSeq& types, const StrSeq& filter, const ::Ice::Current& current) {
ostringstream oss;
oss << " userids.size: " << userids.size() << " begin: " << begin << " limit: " << limit;
InvokeClient tm = InvokeClient::create(current, oss.str(), InvokeClient::INVOKE_LEVEL_INFO);
try {
if(filter.empty() && types.empty())
return getSegment(fs_.gets(userids, begin + limit), userids, begin, limit);
return getSegment(fs_.gets_with_filter(userids, TypesFilter(types), IdsFilter(filter), begin + limit), userids, begin, limit);
} catch (std::exception& e) {
MCE_WARN("UserFeedsI::getByTypesWithFilter Exception! " << e.what());
} catch (...) {
MCE_WARN("UserFeedsI::getByTypesWithFilter Exception!");
}
return FeedMetaSeq();
}