OpenMPCD
Configuration.cpp
2 
6 
7 #include <limits>
8 
9 namespace OpenMPCD
10 {
11 
13  const std::set<std::string>& names,
14  std::string* const offender) const
15 {
16  for(std::size_t i = 0; i < getChildCount(); ++i)
17  {
18  if(names.count(getChild(i).getName()) == 0)
19  {
20  if(offender)
21  *offender = getChild(i).getName();
22  return false;
23  }
24  }
25 
26  return true;
27 }
28 
29 } //namespace OpenMPCD
OpenMPCD::Configuration::Setting::getChildCount
std::size_t getChildCount() const
Returns the number of direct child settings in this setting.
Definition: Configuration.hpp:235
OpenMPCD::Configuration::Setting::getChild
const Setting getChild(const std::size_t childIndex) const
Returns the child setting with the given index.
Definition: Configuration.hpp:250
CompilerDetection.hpp
Exceptions.hpp
OpenMPCD::Configuration::Setting::getName
const std::string getName() const
Returns the name of the setting.
Definition: Configuration.hpp:64
OPENMPCD_DEBUG_ASSERT.hpp
OpenMPCD::Configuration::Setting::childrenHaveNamesInCollection
bool childrenHaveNamesInCollection(const std::set< std::string > &names, std::string *const offender=NULL) const
Returns whether all children in this setting have names that are in the given set.
Definition: Configuration.cpp:12
Configuration.hpp