11 #ifndef __UT_ContainerPrinter__
12 #define __UT_ContainerPrinter__
21 myContainer(c), myLimit(limit) {}
27 template<
typename OS,
typename S>
28 friend OS &operator<<(OS &os, const UT_ContainerPrinter<S> &d);
31 template<
typename OS,
typename S>
33 operator<<(OS &os, const UT_ContainerPrinter<S> &cp)
37 for (
typename S::const_iterator it = cp.myContainer.begin();
38 it != cp.myContainer.end(); ++it, ++
c)
40 if (c > 0) os <<
", ";
41 if (cp.myLimit > 0 && c > cp.myLimit)
48 os <<
"}[" << cp.myContainer.size() <<
"]";
52 #endif // __UT_ContainerPrinter__
UT_ContainerPrinter(const T &c, exint limit=100)