X-Git-Url: https://git.llucax.com/z.facultad/75.29/susanita.git/blobdiff_plain/3ca0929e3a23301865a192e7cd4e6104724dc4f9..74c50ae54daacf5a14ffe941806f554b50b6f7a8:/src/susanita.cpp?ds=sidebyside diff --git a/src/susanita.cpp b/src/susanita.cpp index a97a15e..17a601e 100644 --- a/src/susanita.cpp +++ b/src/susanita.cpp @@ -40,8 +40,9 @@ get_persona(const std::string& nombre) const void Susanita:: -mostrar_estado() const +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"; @@ -50,5 +51,31 @@ mostrar_estado() const 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"; + } + } }