bool CircleContainer::insert(const Circle& circle)
{
	ScopedWriteLock lock(read_write_mutex_);
	auto result = circle_container_.insert(map<wstring, Circle>::value_type(circle.getCircleID(), circle));
	onCircleinserted(circle);
	return result.second;
}
Пример #2
0
bool CircleList::add(const Circle& circle)
{
	if(!add(circle.getCircleID()))
	{
		return false;
	}
	onCircleAdded(circle);
	return true;
}
void CircleContainer::updateItem(const Circle& circle)
{
	ScopedWriteLock lock(read_write_mutex_);
	circle_container_[circle.getCircleID()] = circle;
}