X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/2a0c7d1e56dfff663c1fbcaaf39b4e00140a0121..HEAD:/trunk/src/indicemagico.h diff --git a/trunk/src/indicemagico.h b/trunk/src/indicemagico.h index 01dae6d..9ad336e 100644 --- a/trunk/src/indicemagico.h +++ b/trunk/src/indicemagico.h @@ -114,23 +114,41 @@ public: }; template < typename T > +inline std::ostream& operator<< (std::ostream& os, CIndiceMagico& im) { unsigned c = im.count(); +#ifdef LOG + if (c-- == 0) return os << ""; + for (unsigned i = 0; i < c; ++i) + os << im[i] << ","; + os << im[c]; + return os; +#else // ! LOG if (c == 0) return os << "\t\tvacío\n"; for (unsigned i = 0; i < c; ++i) os << "\t\t" << im.keys(i) << ":\t" << im[i] << "\n"; return os; +#endif // LOG } template < typename T > +inline std::ostream& operator<< (std::ostream& os, CIndiceMagico& im) { unsigned c = im.count(); +#ifdef LOG + if (c-- == 0) return os << ""; + for (unsigned i = 0; i < c; ++i) + os << *im[i] << ","; + os << *im[c]; + return os; +#else // ! LOG if (c == 0) return os << "\t\tvacío\n"; for (unsigned i = 0; i < c; ++i) os << "\t\t" << im.keys(i) << ":\t" << *im[i] << "\n"; return os; +#endif // LOG } #endif