1 | /* |
---|
2 | Copyright (C) 2014 |
---|
3 | Alejandro Mujica (amujica@cenditel.gob.ve) |
---|
4 | José Ruiz (jruiz@cenditel.gob.ve) |
---|
5 | Julie Vera (jvera@cenditel.gob.ve) |
---|
6 | |
---|
7 | CENDITEL Fundación Centro Nacional de Desarrollo e Investigación en |
---|
8 | Tecnologías Libres |
---|
9 | |
---|
10 | Este programa es software libre; Usted puede usarlo bajo los términos de la |
---|
11 | licencia de software GPL versión 2.0 de la Free Software Foundation. |
---|
12 | |
---|
13 | Este programa se distribuye con la esperanza de que sea útil, pero SIN |
---|
14 | NINGUNA GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o |
---|
15 | ADECUACIÓN A UN PROPÓSITO PARTICULAR. |
---|
16 | Consulte la licencia GPL para más detalles. Usted debe recibir una copia |
---|
17 | de la GPL junto con este programa; si no, escriba a la Free Software |
---|
18 | Foundation Inc. 51 Franklin Street,5 Piso, Boston, MA 02110-1301, USA. |
---|
19 | */ |
---|
20 | |
---|
21 | /* |
---|
22 | Autor: Alejandro J. Mujica |
---|
23 | Fecha de creación: 05/06/2014 |
---|
24 | Este archivo contiene la definición de la clase Imported_Product y una |
---|
25 | estructura que llamada Imported_Product_Simulation_Attributes que contiene los |
---|
26 | atributos utilizados en la simulación para una instancia de Imported_Product. |
---|
27 | */ |
---|
28 | |
---|
29 | # ifndef IMPORTED_PRODUCT_H |
---|
30 | # define IMPORTED_PRODUCT_H |
---|
31 | |
---|
32 | # include <good.H> |
---|
33 | |
---|
34 | /// Atributos de simulación para la clase Imported_Product. |
---|
35 | struct Imported_Product_Simulation_Attributes |
---|
36 | { |
---|
37 | size_t state_number; |
---|
38 | |
---|
39 | real imports; |
---|
40 | real stock; |
---|
41 | real sales; |
---|
42 | real requested_quantity; |
---|
43 | real price; |
---|
44 | |
---|
45 | Imported_Product_Simulation_Attributes() |
---|
46 | : state_number(0), imports(0.0), sales(0.0), requested_quantity(0.0), |
---|
47 | price(0.0) |
---|
48 | { |
---|
49 | // Empty |
---|
50 | } |
---|
51 | }; |
---|
52 | |
---|
53 | /** Representa la especialización Imported_Product de la clase Good. |
---|
54 | * |
---|
55 | * Esta clase representa un bien declarado por un comprador como importado. |
---|
56 | * |
---|
57 | * @author Alejandro J. Mujica |
---|
58 | */ |
---|
59 | class Imported_Product : public Good |
---|
60 | { |
---|
61 | real imports; |
---|
62 | real sale; |
---|
63 | real requested_quantity; |
---|
64 | real price; |
---|
65 | |
---|
66 | DECLARE_SIMULATION_ATTRIBUTES(Imported_Product_Simulation_Attributes) |
---|
67 | |
---|
68 | public: |
---|
69 | Imported_Product(); |
---|
70 | |
---|
71 | Imported_Product(const Imported_Product &); |
---|
72 | |
---|
73 | Imported_Product(Imported_Product &&); |
---|
74 | |
---|
75 | const real & get_imports() const; |
---|
76 | |
---|
77 | void set_imports(const real &); |
---|
78 | |
---|
79 | const real & get_sale() const; |
---|
80 | |
---|
81 | void set_sale(const real &); |
---|
82 | |
---|
83 | const real & get_requested_quantity() const; |
---|
84 | |
---|
85 | void set_requested_quantity(const real &); |
---|
86 | |
---|
87 | const real & get_price() const; |
---|
88 | |
---|
89 | void set_price(const real &); |
---|
90 | |
---|
91 | Imported_Product & operator = (const Imported_Product &); |
---|
92 | |
---|
93 | Imported_Product & operator = (Imported_Product &&); |
---|
94 | |
---|
95 | DEFINE_SIMULATION_ATTRIBUTES_METHODS(Imported_Product_Simulation_Attributes) |
---|
96 | |
---|
97 | std::string to_dot() const; |
---|
98 | |
---|
99 | Good_Type get_type() const; |
---|
100 | |
---|
101 | real & production_at(const size_t &); |
---|
102 | |
---|
103 | real & stock_at(const size_t &); |
---|
104 | |
---|
105 | real & internal_requested_quantity_at(const size_t &); |
---|
106 | |
---|
107 | real requested_quantity_at(const size_t &); |
---|
108 | |
---|
109 | real & internal_sales_at(const size_t &); |
---|
110 | |
---|
111 | real & price_at(const size_t &); |
---|
112 | }; |
---|
113 | |
---|
114 | # endif /* IMPORTED_PRODUCT_H */ |
---|
115 | |
---|