source: observatorio/simulacion/SimEscenariosEconomicos/good.H

simulacion
Last change on this file was 7941763, checked in by Alejandro <amujica@…>, 10 years ago

eliminacion de un filtro redundante

  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2  Copyright (C) 2012
3  Alejandro Mujica (amujica@cenditel.gob.ve)
4  Erwin Paredes (eparedes@cenditel.gob.ve)
5  José Ruiz (jruiz@cenditel.gob.ve)
6  Rodolfo Rangel (rrangel@cenditel.gob.ve)
7  Julie Vera (jvera@cenditel.gob.ve)
8 
9  CENDITEL Fundación Centro Nacional de Desarrollo e Investigación en
10  Tecnologías Libres
11 
12  Este programa es software libre; Usted puede usarlo bajo los términos de la
13  licencia de software GPL versión 2.0 de la Free Software Foundation.
14 
15  Este programa se distribuye con la esperanza de que sea útil, pero SIN
16  NINGUNA GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o
17  ADECUACIÓN A UN PROPÓSITO PARTICULAR.
18  Consulte la licencia GPL para más detalles. Usted debe recibir una copia
19  de la GPL junto con este programa; si no, escriba a la Free Software
20  Foundation Inc. 51 Franklin Street,5 Piso, Boston, MA 02110-1301, USA.
21*/
22
23/*
24  Autor:             Alejandro J. Mujica
25  Fecha de creación: 10/09/2013
26  Este archivo contiene la definición de la clase Good.
27*/
28
29# ifndef GOOD_H
30# define GOOD_H
31
32# include <string>
33
34# include <types.H>
35
36enum GoodType {
37
38    INPUT_GOOD,
39
40    PRODUCT_GOOD,
41
42    NUM_GOOD_TYPES
43};
44
45
46/** Clase para representar un bien que fluye por la red productiva.
47 *
48 *  Un bien puede tener dos tipos: Insumo o Producto. Esta clase abstrae la
49 *  forma general de ambos tipos.
50 *
51 *  @author Alejandro J. Mujica
52 */
53class Good {
54
55    long id;
56
57    std::string name;
58
59    std::string technicalSpecifications;
60
61    std::string tariffCode;
62
63    std::string measurementUnit;
64
65    std::string trademark;
66
67    real usedCapacity;
68
69    real quantity;
70
71    real totalQuantity;
72
73    real unitarianPrice;
74
75public:
76    Good();
77
78    Good(const Good &);
79
80    Good(Good &&);
81
82    virtual ~Good();
83
84    const long & getId() const;
85
86    void setId(const long &);
87
88    const std::string & getName() const;
89
90    void setName(const std::string &);
91
92    void setName(std::string &&);
93
94    const std::string & getTechnicalSpecifications() const;
95
96    void setTechnicalSpecifications(const std::string &);
97
98    void setTechnicalSpecifications(std::string &&);
99
100    const std::string & getTariffCode() const;
101
102    void setTariffCode(const std::string &);
103
104    void setTariffCode(std::string &&);
105
106    const std::string & getMeasurementUnit() const;
107
108    void setMeasurementUnit(const std::string &);
109
110    void setMeasurementUnit(std::string &&);
111
112    const std::string & getTrademark() const;
113
114    void setTrademark(const std::string &);
115
116    void setTrademark(std::string &&);
117
118    const real & getUsedCapacity() const;
119
120    void setUsedCapacity(const real &);
121
122    const real & getQuantity() const;
123
124    void setQuantity(const real &);
125
126    const real & getTotalQuantity() const;
127
128    void setTotalQuantity(const real &);
129
130    const real & getUnitarianPrice() const;
131
132    void setUnitarianPrice(const real &);
133
134    Good & operator = (const Good &);
135
136    Good & operator = (Good &&);
137
138    virtual GoodType getType() const = 0;
139};
140
141# define COMPANY(good)                                                         \
142  (good->getType() == INPUT_GOOD ?                                             \
143   (static_cast <Input *> (good))->getProviderCompany() :                      \
144   (static_cast <Product *> (good))->getProducerPlant()->getOwnerCompany()     \
145  )
146
147# endif // GOOD_H
148
Note: See TracBrowser for help on using the repository browser.