Exemplo n.º 1
0
ClientVersionList ClientVersion::getAll()
{
	ClientVersionList l;
	for(VersionMap::iterator i = client_versions.begin(); i != client_versions.end(); ++i)
		l.push_back(i->second);
	return l;
}
Exemplo n.º 2
0
ClientVersionList ClientVersion::getAllForOTBMVersion(MapVersionID id)
{
	ClientVersionList l;
	for(VersionMap::iterator i = client_versions.begin(); i != client_versions.end(); ++i)
		if (i->second->isVisible())
			for(std::vector<MapVersionID>::iterator v = i->second->map_versions_supported.begin(); v != i->second->map_versions_supported.end(); ++v)
				if (*v == id)
					l.push_back(i->second);
	return l;
}
Exemplo n.º 3
0
ClientVersionList ClientVersion::getAllVersionsSupportedForClientVersion(ClientVersion* clientVersion)
{
	ClientVersionList versionList;
	for(const auto& versionEntry : client_versions) {
		ClientVersion* version = versionEntry.second;
		for(ClientVersion* checkVersion : version->getExtensionsSupported()) {
			if(clientVersion == checkVersion) {
				versionList.push_back(version);
			}
		}
	}
	std::sort(versionList.begin(), versionList.end(), VersionComparisonPredicate);
	return versionList;
}
Exemplo n.º 4
0
ClientVersionList ClientVersion::getAllVersionsSupportedForClientVersion(ClientVersion* v)
{
	ClientVersionList vs;
	for (VersionMap::iterator iv = client_versions.begin(); iv != client_versions.end(); ++iv)
	{
		ClientVersionList extvs = iv->second->getExtensionsSupported();
		for (ClientVersionList::iterator ev = extvs.begin(); ev != extvs.end(); ++ev)
		{
			if (v == *ev)
			{
				vs.push_back(iv->second);
				break;
			}
		}
	}
	std::sort(vs.begin(), vs.end(), VersionComparisonPredicate);
	return vs;
}