MCPcopy Create free account
hub / github.com/Gecode/gecode / get_constraint_names

Function get_constraint_names

gecode/flatzinc.hh:755–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753 return result.str();
754 }
755 static std::vector<std::string> get_constraint_names(AST::Array *const ann) {
756 std::vector<std::string> result;
757 if (ann) {
758 for (const auto & i : ann->a) {
759 if (i->isArray()) {
760 auto nested_result = get_constraint_names(i->getArray());
761 result.insert(result.end(), nested_result.begin(), nested_result.end());
762 } else if (i->isCall("mzn_constraint_name")) {
763 result.emplace_back(i->getCall()->args->getString());
764 }
765 }
766 }
767 return result;
768 }
769 };
770
771 /**

Callers 1

flatzinc.hhFile · 0.85

Calls 8

isArrayMethod · 0.80
getArrayMethod · 0.80
isCallMethod · 0.80
getStringMethod · 0.80
getCallMethod · 0.80
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected