BlackWhitelistUpdate.cpp
Go to the documentation of this file.
1 #include "BlackWhitelistUpdate.h"
2 
3 
4 void armarx::updateStringList(std::set<std::string>& list, const StringListUpdate& update)
5 {
6  if (update.clear)
7  {
8  list.clear();
9  }
10  else if (!update.add.empty())
11  {
12  list.insert(update.add.begin(), update.add.end());
13  }
14  else if (!update.set.empty())
15  {
16  list = { update.set.begin(), update.set.end() };
17  }
18 }
list
list(APPEND SOURCES ${QT_RESOURCES}) set(COMPONENT_LIBS ArmarXGui ArmarXCoreObservers ArmarXCoreEigen3Variants PlotterController $
Definition: CMakeLists.txt:49
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
BlackWhitelistUpdate.h
armarx::updateStringList
void updateStringList(std::set< std::string > &list, const StringListUpdate &update)
Definition: BlackWhitelistUpdate.cpp:4