source: observatorio/simulacion/SimEscenariosEconomicos/company.C

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.4 KB
Line 
1/*
2  Copyright (c), 2007, CENDITEL.
3  Permission is granted to copy, distribute and/or modify this document under
4  the terms of the GNU Free Documentation License, Version 1.2 or any later
5  version published by the Free Software Foundation; with no Invariant Sections,
6  no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is
7  included in the section entitled "GNU Free Documentation License".
8
9  Una copia de la licencia puede obtenerse en los ficheros llamados
10  "copyright.txt" en inglés, "copyright.es.txt" en español o en los siguientes
11  sitios en Internet:
12
13  - http://www.gnu.org/copyleft/fdl.html
14  - http://www.fsf.org/licensing/licenses/fdl.html
15*/
16
17/*
18  Autor:             Alejandro J. Mujica
19  Fecha de creación: 10/09/2013
20  Este archivo contiene la implementación de la clase Company.
21*/
22
23# include <company.H>
24
25Company::Company()
26    : rif("NULL"), name("NULL"), nationality("NULL"), origCountry("NULL"),
27      procCountry("NULL") {
28
29    // Empty
30}
31
32Company::Company(const Company & company)
33    : rif(company.rif), name(company.name), nationality(company.nationality),
34      origCountry(company.origCountry),  procCountry(company.procCountry) {
35
36    // Empty
37}
38
39Company::Company(Company && company)
40    : rif("NULL"), name("NULL"),  nationality("NULL"), origCountry("NULL"),
41      procCountry("NULL") {
42
43    std::swap(rif, company.rif);
44    std::swap(name, company.name);
45    std::swap(nationality, company.nationality);
46    std::swap(origCountry, company.origCountry);
47    std::swap(procCountry, company.procCountry);
48}
49
50const std::string & Company::getRif() const {
51    return rif;
52}
53
54void Company::setRif(const std::string & rif) {
55    this->rif = rif;
56}
57
58void Company::setRif(std::string && rif) {
59    this->rif = std::move(rif);
60}
61
62const std::string & Company::getName() const {
63    return name;
64}
65
66void Company::setName(const std::string & name) {
67    this->name = name;
68}
69
70void Company::setName(std::string && name) {
71    this->name = std::move(name);
72}
73
74const std::string & Company::getNationality() const {
75    return nationality;
76}
77
78void Company::setNationality(const std::string & nationality) {
79    this->nationality = nationality;
80}
81
82void Company::setNationality(std::string && nationality) {
83    this->nationality = std::move(nationality);
84}
85
86const std::string & Company::getOrigCountry() const {
87    return origCountry;
88}
89
90void Company::setOrigCountry(const std::string & origCountry) {
91    this->origCountry = origCountry;
92}
93
94void Company::setOrigCountry(std::string && origCountry) {
95    this->origCountry = std::move(origCountry);
96}
97
98const std::string & Company::getProcCountry() const {
99    return procCountry;
100}
101
102void Company::setProcCountry(const std::string & procCountry) {
103    this->procCountry = procCountry;
104}
105
106void Company::setProcCountry(std::string && procCountry) {
107    this->procCountry = std::move(procCountry);
108}
109
110Company & Company::operator = (const Company & company)  {
111    if (&company == this)
112        return *this;
113
114    rif = company.rif;
115    name = company.name;
116    nationality = company.nationality;
117    origCountry = company.origCountry;
118    procCountry = company.procCountry;
119
120    return *this;
121}
122
123Company & Company::operator = (Company && company) {
124    std::swap(rif, company.rif);
125    std::swap(name, company.name);
126    std::swap(nationality, company.nationality);
127    std::swap(origCountry, company.origCountry);
128    std::swap(procCountry, company.procCountry);
129
130    return *this;
131}
132
Note: See TracBrowser for help on using the repository browser.