blob: 4e03ba890a52368bf1c80217bab2b2bfdb433236 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*
* File: ConReceta.cpp
* Author: mitsuo
*
* Created on 27 November 2022, 11:51
*/
#include <cstring>
#include <iomanip>
#include "ConReceta.h"
#include "aux.h"
using namespace std;
ConReceta::ConReceta() {
this->especialidad = new char [MAXLEN];
}
ConReceta::ConReceta(const ConReceta& orig) {
}
ConReceta::~ConReceta() {
delete [] this->especialidad;
}
void ConReceta::SetEspecialidad(const char* especialidad) {
strcpy(this->especialidad, especialidad);
}
char* ConReceta::GetEspecialidad() const {
return especialidad;
}
void ConReceta::SetCodmed(int codmed) {
this->codmed = codmed;
}
int ConReceta::GetCodmed() const {
return codmed;
}
void ConReceta::write(std::ostream & output) {
output << WL(12) << this->GetCodigo();
output << WL(40) << this->GetNombre();
output << WR(8) << this->GetCantidad();
output << WL(12) << this->codmed;
output << WL(20) << this->especialidad;
output << '\n';
}
|