• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Disk.h

Go to the documentation of this file.
00001 /* 
00002  * File:   Disk.h
00003  * Author: fermat
00004  *
00005  * Created on 20. Januar 2010, 10:39
00006  */
00007 
00008 #ifndef _DISK_H
00009 #define _DISK_H
00010 
00011 #include<stdint.h>
00012 #include<xercesc/dom/DOMElement.hpp>
00013 #include<list>
00014 #include<string>
00015 
00016 #include "helper.h"
00017 
00018 namespace VDRIVE {
00019 
00028     class Disk {
00029     public:
00030 
00036         Disk(xercesc::DOMElement* data);
00037 
00048         Disk(int64_t id, int64_t capacity, void* data);
00049 
00055         Disk(const Disk& orig);
00056 
00060         virtual ~Disk();
00061 
00067         int64_t getId() const;
00068 
00074         void setId(int64_t id);
00075 
00084         int64_t getCapacity() const;
00085 
00094         void setCapacity(int64_t capacity);
00095 
00103         void* getData() const;
00104 
00111         void setData(void* data);
00112 
00119         virtual xercesc::DOMElement* toXML(xercesc::DOMDocument* doc);
00120 
00126         static std::string getXMLRootType() {
00127             return std::string("Disk");
00128         }
00129 
00136         static void storeDiskList(std::list<Disk*>* disks, std::string filename);
00137 
00146         static std::list<Disk*>* loadDiskList(std::string filename);
00147 
00148 #ifndef no_sqlite
00149 
00155         static void storeDiskListDBFile(std::list<Disk*>* disks, std::string filename);
00156 
00165         static std::list<Disk*>* loadDiskListDBFile(std::string filename);
00166 #endif
00167     private:
00168 
00172         int64_t id;
00173 
00178         int64_t capacity;
00179 
00184         void* data;
00185     };
00186 }
00187 #endif  /* _DISK_H */
00188 

Generated on Mon Oct 11 2010 13:09:26 for CppDistributors by  doxygen 1.7.2