-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParticion.cpp
98 lines (81 loc) · 2.42 KB
/
Particion.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/************************************************************************
Particion.h
**************************************************************************/
#include "Particion.h"
Particion::Particion (){
this->id = 0;
this->tamano = 0;
this->idImagen = 0;
this->idTexto = 0;
this->orden =1;
this->comprimida = false;
}
Particion::Particion (string datos, unsigned int id, unsigned int tamano, unsigned int idImagen, unsigned int idTexto){
this->id = id;
this->tamano = tamano;
this->idImagen = idImagen;
this->datos = datos;
this->idTexto = idTexto;
this->orden =1;
this->comprimida = false;
}
Particion::Particion (string datos, unsigned int id, unsigned int tamano, unsigned int idImagen, unsigned int idTexto, unsigned int orden){
this->id = id;
this->tamano = tamano;
this->idImagen = idImagen;
this->datos = datos;
this->idTexto = idTexto;
this->orden =orden;
this->comprimida = false;
}
Particion::Particion (string datos, unsigned int id, unsigned int tamano, unsigned int idTexto){
this->id = id;
this->tamano = tamano;
this->idImagen = 0;
this->idTexto = idTexto;
this->datos = datos;
this->orden =1;
this->comprimida = false;
}
Particion::~Particion ( ){
// TODO
}
void Particion::setIdImagen ( unsigned int new_var ) {
this->idImagen = new_var;
}
unsigned int Particion::getIdTexto ( ){
return this->idTexto;
}
unsigned int Particion::getIdImagen ( ) {
return this->idImagen;
}
void Particion::setOffsetImagen ( const unsigned int new_var ) {
this->offsetImagen = new_var;
}
unsigned int Particion::getOffsetImagen ( ) {
return this->offsetImagen;
}
void Particion::setDatos(string datos){
this->datos = datos;
this->tamano = datos.size();
}
string Particion::getDatos(){
return this->datos;
}
unsigned int Particion::getOrden ( ){
return this->orden;
}
void Particion::setOrden ( unsigned int new_var ){
this->orden = new_var;
}
void Particion::setIdTexto ( unsigned int new_var ){
this->idTexto = new_var;
}
Particion* Particion::copiar(){
Particion* particion = new Particion(this->datos, this->id, this->tamano,
this->idImagen, this->idTexto, this->orden);
particion->setOffsetImagen(this->offsetImagen);
particion->setPersistido(this->esPersistido());
particion->setComprimida(this->comprimida);
return particion;
}