[7bbc686] | 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: 26/11/2013 |
---|
| 26 | Este archivo contiene la implementación de la clase que contiene una variable |
---|
| 27 | global para almacenar el tipo de estudio de simulación que se esté ejecutando: |
---|
| 28 | cambio de producción o cambio de precios. |
---|
| 29 | */ |
---|
| 30 | |
---|
| 31 | # include <simType.H> |
---|
| 32 | |
---|
| 33 | std::unique_ptr <SimType> SimType::instance; |
---|
| 34 | |
---|
| 35 | SimType::SimType() { |
---|
| 36 | // Empty |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | SimType & SimType::getInstance() { |
---|
| 40 | |
---|
| 41 | if (instance.get() == NULL) |
---|
| 42 | instance = std::unique_ptr <SimType> (new SimType); |
---|
| 43 | |
---|
| 44 | return *instance; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | const StudyType & SimType::getType() const { |
---|
| 48 | return type; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | void SimType::setType(const StudyType & type) { |
---|
| 52 | this->type = type; |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | const std::string & SimType::getYear() const { |
---|
| 56 | return year; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | void SimType::setYear(const std::string & year) { |
---|
| 60 | this->year = year; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | void SimType::setYear(std::string && year) { |
---|
| 64 | this->year = std::move(year); |
---|
| 65 | } |
---|