#include "susanita.h"
#include <cassert>
+#include <iostream>
Susanita::~Susanita()
{
return ip->second;
}
+void
+Susanita::
+mostrar_estado(int mostrar_prios) const
+{
+ std::cout << "Personas\n";
+ for (personas_type::const_iterator ih = hombres.begin();
+ ih != hombres.end(); ++ih)
+ std::cout << **ih << "\n";
+ std::cout << "\n";
+ for (personas_type::const_iterator im = mujeres.begin();
+ im != mujeres.end(); ++im)
+ std::cout << **im << "\n";
+ std::cout << "\n" << std::endl;
+
+ if (mostrar_prios)
+ return;
+
+ std::cout << "Prioridades\n";
+ for (personas_type::const_iterator ih = hombres.begin();
+ ih != hombres.end(); ++ih) {
+ Persona& h = **ih;
+ std::cout << h << "\n";
+ for (personas_type::iterator im = h.prefs.begin();
+ im != h.prefs.end(); ++im) {
+ Persona &p = **im;
+ std::cout << "\t" << p << "\n";
+ }
+ }
+ std::cout << "\n";
+ for (personas_type::const_iterator ih = mujeres.begin();
+ ih != mujeres.end(); ++ih) {
+ Persona& h = **ih;
+ std::cout << h << "\n";
+ for (personas_type::iterator im = h.prefs.begin();
+ im != h.prefs.end(); ++im) {
+ Persona &p = **im;
+ std::cout << "\t" << p << "\n";
+ }
+ }
+}
+