blob: 5fdd0439d83de423190238614b53c8372b10eb7f (
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: SinReceta.cpp
* Author: mitsuo
*
* Created on 27 November 2022, 11:53
*/
#include <cstring>
#include <iomanip>
#include "SinReceta.h"
#include "aux.h"
using namespace std;
SinReceta::SinReceta() {
this->nombre = new char [MAXLEN];
}
SinReceta::SinReceta(const SinReceta& orig) {
}
SinReceta::~SinReceta() {
delete [] this->nombre;
}
void SinReceta::SetPacienteNombre(const char* nombre) {
strcpy(this->nombre, nombre);
}
char* SinReceta::GetPacienteNombre() const {
return nombre;
}
void SinReceta::SetDni(int dni) {
this->dni = dni;
}
int SinReceta::GetDni() const {
return dni;
}
void SinReceta::write(std::ostream & output) {
output << WL(12) << this->GetCodigo();
output << WL(40) << this->GetNombre();
output << WR(8) << this->GetCantidad();
output << WL(12) << this->dni;
output << WL(20) << this->nombre;
output << '\n';
}
|