Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _RSDISK_H
00009 #define _RSDISK_H
00010
00011 #include<string>
00012 #include<gmpxx.h>
00013 #include"Disk.h"
00014 #include <xercesc/dom/DOMDocument.hpp>
00015
00016 namespace VDRIVE {
00017
00024 class RSDisk {
00025 public:
00026
00032 RSDisk(Disk* disk);
00033
00039 RSDisk(const RSDisk& orig);
00040
00044 virtual ~RSDisk();
00045
00051 RSDisk(xercesc::DOMElement* data);
00052
00058 int64_t getId() {
00059 return disk->getId();
00060 }
00061
00067 int64_t getCapacity() {
00068 return disk->getCapacity();
00069 }
00070
00076 Disk* getDisk() const {
00077 return disk;
00078 }
00079
00085 int64_t getAlignedCapacity() const {
00086 return alignedCapacity;
00087 }
00088
00094 void setAlignedCapacity(int64_t alignedCapacity) {
00095 this->alignedCapacity = alignedCapacity;
00096 }
00097
00103 int64_t getCPosition() const {
00104 return cPosition;
00105 }
00106
00112 void setCPosition(int64_t cPosition) {
00113 this->cPosition = cPosition;
00114 }
00115
00121 mpq_class getCheckC() const {
00122 return checkC;
00123 }
00124
00130 void setCheckC(mpq_class checkC) {
00131 this->checkC = checkC;
00132 this->checkCDouble = checkC.get_d();
00133 }
00134
00140 double getCheckCDouble() const {
00141 return checkCDouble;
00142 }
00143
00149 mpq_class getCheckCStar() const {
00150 return checkCStar;
00151 }
00152
00158 void setCheckCStar(mpq_class checkCStar) {
00159 this->checkCStar = checkCStar;
00160 this->checkCStarDouble = checkCStar.get_d();
00161 }
00162
00168 double getCheckCStarDouble() const {
00169 return checkCStarDouble;
00170 }
00171
00177 int32_t getKError() const {
00178 return kError;
00179 }
00180
00186 void setKError(int32_t kError) {
00187 this->kError = kError;
00188 }
00189
00195 std::string getRsId() const {
00196 return rsId;
00197 }
00198
00204 void setRsId(std::string rsId) {
00205 this->rsId = rsId;
00206 }
00207
00214 virtual xercesc::DOMElement* toXML(xercesc::DOMDocument* doc);
00215
00221 static std::string getXMLRootType() {
00222 return std::string("RSDisk");
00223 }
00224 private:
00228 Disk* disk;
00229
00233 std::string rsId;
00234
00238 mpq_class checkC;
00239
00244 int32_t kError;
00245
00249 mpq_class checkCStar;
00250
00254 double checkCDouble;
00255
00259 double checkCStarDouble;
00260
00264 int64_t cPosition;
00265
00269 int64_t alignedCapacity;
00270 };
00271 }
00272
00273
00274
00275 #endif
00276