| 3384 | } |
| 3385 | |
| 3386 | void Config::removeSharedView(const char * view) |
| 3387 | { |
| 3388 | if (!view || !*view) |
| 3389 | { |
| 3390 | throw Exception("Shared view could not be removed from config, view name has to be " |
| 3391 | "a non-empty name."); |
| 3392 | } |
| 3393 | ViewVec & views = getImpl()->m_sharedViews; |
| 3394 | auto viewIt = FindView(views, view); |
| 3395 | |
| 3396 | if (viewIt != views.end()) |
| 3397 | { |
| 3398 | views.erase(viewIt); |
| 3399 | |
| 3400 | getImpl()->m_displayCache.clear(); |
| 3401 | |
| 3402 | AutoMutex lock(getImpl()->m_cacheidMutex); |
| 3403 | getImpl()->resetCacheIDs(); |
| 3404 | } |
| 3405 | else |
| 3406 | { |
| 3407 | std::ostringstream os; |
| 3408 | os << "Shared view could not be removed from config. A shared view named '" |
| 3409 | << view << "' could not be found."; |
| 3410 | throw Exception(os.str().c_str()); |
| 3411 | } |
| 3412 | } |
| 3413 | |
| 3414 | void Config::clearSharedViews() |
| 3415 | { |