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


C++ Bindings::push_back方法代码示例

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


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

示例1: getUnexpiredContactsInstrument

// TODO : Unclear how big this dataset would be, decide if this should be removed
bool RegDB::getUnexpiredContactsInstrument(const string& instrument, int timeNow, Bindings& bindings) const
{
	mongo::BSONObj query = BSON(
			"instrument" << instrument <<
			"expirationTime" << BSON_GREATER_THAN(timeNow));

	mongo::ScopedDbConnection conn(_info.getConnectionString());
	auto_ptr<mongo::DBClientCursor> pCursor = conn->query(_info.getNS(), query);
	if (pCursor.get() && pCursor->more())
	{
		while (pCursor->more()) {
			bindings.push_back(RegBinding(pCursor->next()));
		}
		conn.done();
		return true;
	}

	conn.done();
	return false;
}
开发者ID:ATHLSolutions,项目名称:sipxecs,代码行数:21,代码来源:RegDB.cpp

示例2: getUnexpiredContactsUserContaining

bool RegDB::getUnexpiredContactsUserContaining(const string& matchIdentity, int timeNow, Bindings& bindings) const
{
	mongo::BSONObj query = BSON("expirationTime" << BSON_GREATER_THAN(timeNow));

	mongo::ScopedDbConnection conn(_info.getConnectionString());
	auto_ptr<mongo::DBClientCursor> pCursor = conn->query(_info.getNS(), query);
	if (pCursor.get() && pCursor->more())
	{
		while (pCursor->more())
		{
			RegBinding binding(pCursor->next());
			if (binding.getContact().find(matchIdentity) != string::npos)
				bindings.push_back(binding);
		}
		conn.done();
		return bindings.size() > 0;
	}

	conn.done();
	return false;
}
开发者ID:ATHLSolutions,项目名称:sipxecs,代码行数:21,代码来源:RegDB.cpp

示例3: getUnexpiredContactsUser

bool RegDB::getUnexpiredContactsUser(const string& identity, int timeNow, Bindings& bindings) const
{
	static string gruuPrefix = GRUU_PREFIX;

	bool isGruu = identity.substr(0, gruuPrefix.size()) == gruuPrefix;
	mongo::BSONObj query;

	if (isGruu)
	{
		string searchString(identity);
		searchString += ";";
		searchString += SIP_GRUU_URI_PARAM;
		query = BSON(
				"gruu" << searchString <<
				"expirationTime" << BSON_GREATER_THAN(timeNow));
	}
	else
	{
		query = BSON(
				"identity" << identity <<
				"expirationTime" << BSON_GREATER_THAN(timeNow));
	}

	mongo::ScopedDbConnection conn(_info.getConnectionString());
	auto_ptr<mongo::DBClientCursor> pCursor = conn->query(_info.getNS(), query);
	if (pCursor.get() && pCursor->more())
	{
		while (pCursor->more())
		{
			bindings.push_back(RegBinding(pCursor->next()));
		}
		conn.done();
		return true;
	}

	conn.done();
	return false;
}
开发者ID:ATHLSolutions,项目名称:sipxecs,代码行数:38,代码来源:RegDB.cpp


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