template < typename T >
std::ostream& operator<< (std::ostream& os, CIndiceMagico<T>& 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<T*>& 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;
}