-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99da9a9
commit 90f339d
Showing
4 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "presentador_paneles.h" | ||
|
||
#include "../modelo/modelo_interno.h" | ||
#include "presentador.h" | ||
|
||
PresentacionPreparacionPizzas PresentadorPaneles::obtener_vista_preparacion() { | ||
const auto preparacion = modelo.obtener_estado_preparacion_pizzas(); | ||
return presentador::estado_preparacion_pizzas_to_vista(preparacion); | ||
} | ||
|
||
PizzasToStrings PresentadorPaneles::obtener_vista_preparadas() { | ||
const modelo::PizzasAContadores &contadores = | ||
modelo.control_pizzas.contadores; | ||
return presentador::contadores_to_preparadas(contadores); | ||
} | ||
|
||
PresentacionPedidos PresentadorPaneles::obtener_presentacion_pedidos() { | ||
const auto &pedidos = modelo.control_pizzas.pedidos; | ||
const auto presentacion_pedidos = | ||
presentador::crear_presentacion_pedidos(pedidos); | ||
return presentacion_pedidos; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
#pragma once | ||
|
||
#include "../modelo/modelo.h" | ||
#include "../modelo/modelo_interno.h" | ||
#include "presentador.h" | ||
#include "../vista/vista_shared.h" | ||
|
||
class ModeloInterno; | ||
|
||
class PresentadorPaneles { | ||
public: | ||
const ModeloInterno &modelo; | ||
|
||
PresentacionPreparacionPizzas obtener_vista_preparacion() { | ||
const auto preparacion = modelo.obtener_estado_preparacion_pizzas(); | ||
return presentador::estado_preparacion_pizzas_to_vista(preparacion); | ||
} | ||
|
||
PizzasToStrings obtener_vista_preparadas() { | ||
const modelo::PizzasAContadores &contadores = | ||
modelo.control_pizzas.contadores; | ||
return presentador::contadores_to_preparadas(contadores); | ||
} | ||
|
||
PresentacionPedidos obtener_presentacion_pedidos() { | ||
const auto &pedidos = modelo.control_pizzas.pedidos; | ||
const auto presentacion_pedidos = | ||
presentador::crear_presentacion_pedidos(pedidos); | ||
return presentacion_pedidos; | ||
} | ||
PresentacionPreparacionPizzas obtener_vista_preparacion(); | ||
PizzasToStrings obtener_vista_preparadas(); | ||
PresentacionPedidos obtener_presentacion_pedidos(); | ||
}; |