X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/a4c9e136c32a1686046eaf6c6e1902cac4b7bb73..586ad2d03cf73d7e75a1a2522db3e0c4eedd5e9c:/trunk/src/indicemagico.h diff --git a/trunk/src/indicemagico.h b/trunk/src/indicemagico.h index adbc0cc..a23c975 100644 --- a/trunk/src/indicemagico.h +++ b/trunk/src/indicemagico.h @@ -115,8 +115,20 @@ public: template < typename T > std::ostream& operator<< (std::ostream& os, CIndiceMagico& im) { - for (unsigned i = 0; i < im.count(); ++i) - os << "\t" << im.keys(i) << "=" << im[i] << "\n"; + unsigned c = im.count(); + 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; +} + +template < typename T > +std::ostream& operator<< (std::ostream& os, CIndiceMagico& im) +{ + unsigned c = im.count(); + 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; }