void print(std::basic_ostream<Char,Traits>& s, bool assigned, IL& lb, IU& ub, unsigned int cardMin, unsigned int cardMax) { if (assigned) { printBound(s, ub); } else { printBound(s,lb); s << ".."; printBound(s,ub); if (cardMin==cardMax) { s << "#(" << cardMin << ")"; } else { s << "#(" << cardMin << "," << cardMax << ")"; } } }
int main(){ const int X=1; const int Y=2; const unsigned int R=3; circle myCircle=createCircle(X,Y,R); box myBox=createBox(myCircle); printBound(myBox); return 0; }
std::basic_ostream<Char,Traits>& operator <<(std::basic_ostream<Char,Traits>& os, const ConstSetView& x) { std::basic_ostringstream<Char,Traits> s; s.copyfmt(os); s.width(0); LubRanges<ConstSetView> ub(x); printBound(s, ub); s << "#(" << x.cardMin() << ")"; return os << s.str(); }
std::basic_ostream<Char,Traits>& operator <<(std::basic_ostream<Char,Traits>& os, const SingletonView& x) { std::basic_ostringstream<Char,Traits> s; s.copyfmt(os); s.width(0); if (x.assigned()) { s << "{" << x.glbMin() << "}#(1)"; } else { LubRanges<SingletonView> ub(x); s << "{}.."; printBound(s, ub); s << "#(1)"; } return os << s.str(); }