Beispiel #1
0
std::vector<std::pair<std::string, std::string>> RepoBSON::getFileList() const
{
	std::vector<std::pair<std::string, std::string>> fileList;
	if (hasField(REPO_LABEL_OVERSIZED_FILES))
	{
		RepoBSON extRefbson = getObjectField(REPO_LABEL_OVERSIZED_FILES);

		std::set<std::string> fieldNames;
		extRefbson.getFieldNames(fieldNames);
		for (const auto &name : fieldNames)
		{
			fileList.push_back(std::pair<std::string, std::string>(name, extRefbson.getStringField(name)));
		}
	}

	return fileList;
}
std::vector<std::string> RevisionNode::getOrgFiles() const
{
	std::vector<std::string> fileList;
	if (hasField(REPO_NODE_REVISION_LABEL_REF_FILE))
	{
		RepoBSON arraybson = getObjectField(REPO_NODE_REVISION_LABEL_REF_FILE);

		std::set<std::string> fields;
		arraybson.getFieldNames(fields);

		for (const auto &field : fields)
		{
			fileList.push_back(arraybson.getStringField(field));
		}
	}

	return fileList;
}