/** \brief a predicate that decides whether StrategyInfo should be reset
 *
 *  StrategyInfo on a NameTree entry needs to be reset,
 *  if its effective strategy is covered by the changing StrategyChoice entry.
 */
static inline std::pair<bool,bool>
predicate_nameTreeEntry_needResetStrategyChoice(const name_tree::Entry& nameTreeEntry,
                                            const name_tree::Entry& rootEntry)
{
  if (&nameTreeEntry == &rootEntry) {
    return std::make_pair(true, true);
  }
  if (static_cast<bool>(nameTreeEntry.getStrategyChoiceEntry())) {
    return std::make_pair(false, false);
  }
  return std::make_pair(true, true);
}
static inline bool
predicate_NameTreeEntry_hasStrategyChoiceEntry(const name_tree::Entry& entry)
{
  return static_cast<bool>(entry.getStrategyChoiceEntry());
}
Exemplo n.º 3
0
static inline bool
nteHasStrategyChoiceEntry(const name_tree::Entry& nte)
{
  return nte.getStrategyChoiceEntry() != nullptr;
}