11 std::string indent(
' ', indentwidth);
12 std::cout << indent <<
"Intersection\n"
13 << indent <<
" first operand\n";
16 std::cout << indent <<
" second operand\n";
21 std::vector<std::shared_ptr<Base> > first, firstrep, second;
27 for (
auto item: firstrep) {
28 item->divideBy(second);
31 for (
auto item: first) {
32 item->divideBy(firstrep);
33 bfuncs.emplace_back(item->clone());
36 for (
auto item: first)
38 for (
auto item: firstrep)
40 for (
auto item: second)
48 std::regex argumentList(
"(,[a-z]+\\(.*)");
49 std::regex endParenthesis(
"\\)(.*)");
52 std::string str(it,
end);
53 if (!std::regex_match(str, what, argumentList))
return false;
59 str = std::string(it,
end);
60 if (!std::regex_match(str, what, endParenthesis))
return false;
62 std::string fullMatch = what[0];
63 std::string rest = what[1];
65 it += (fullMatch.size() - rest.size());
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
std::string::iterator iterator
virtual void apply(std::vector< std::shared_ptr< Base > > &bfuncs)=0
static bool parse(iterator &it, const iterator &end, Function *&fun)
virtual void print(int indent)=0
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)
virtual void apply(std::vector< std::shared_ptr< Base > > &bfuncs)
virtual void print(int indentwidth)
Function * secondOperand_m
Function * firstOperand_m