#include <Disk.h>
List of all members.
Detailed Description
This class represents a Disk for the Distributor. Each Disk consists of an unique ID (in the list of Disks used by this lib), a capacity and a reference to some data, that can be used by the person instantiating a Disk.
- Author:
- Sascha Effert <fermat@uni-paderborn.de>
Constructor & Destructor Documentation
Disk::Disk |
( |
xercesc::DOMElement * |
data ) |
|
Create a new instance from the data in the given XML Element.
- Parameters:
-
data | An XML-Element containing the description of a disk. |
Disk::Disk |
( |
int64_t |
id, |
|
|
int64_t |
capacity, |
|
|
void * |
data |
|
) |
| |
instantiates a new Disk with the given values.
- Parameters:
-
id | ID of the disk. Has to be unique all over this library. |
capacity | Capacity of the Disk in bytes. (This can also be in any other scale, but has to be same for ExtentSize of Distributor) |
data | Pointer to be used by developer instantiating this disk. May not be changed by Distributors! |
Disk::Disk |
( |
const Disk & |
orig ) |
|
copy constructor
- Parameters:
-
Disk::~Disk |
( |
) |
[virtual] |
Member Function Documentation
int64_t Disk::getCapacity |
( |
) |
const |
Get the Capacity of the Disk in bytes. (This can also be in any other scale, but has to be same for ExtentSize of Distributor)
- Returns:
- Capacity of the Disk in bytes. (This can also be in any other scale, but has to be same for ExtentSize of Distributor)
void * Disk::getData |
( |
) |
const |
Get the Pointer to be used by developer instantiating this disk. May not be changed by Distributors!
- Returns:
- Pointer to be used by developer instantiating this disk. May not be changed by Distributors!
int64_t Disk::getId |
( |
) |
const |
Get the ID of the disk. Has to be unique all over this library.
- Returns:
- ID of the disk. Has to be unique all over this library.
static std::string VDRIVE::Disk::getXMLRootType |
( |
) |
[inline, static] |
Get the Root-Type of XML-Elements representing this class.
- Returns:
- the Root-Type of XML-Elements representing this class.
std::list< Disk * > * Disk::loadDiskList |
( |
std::string |
filename ) |
[static] |
Using this method it is possible to read a list of disks out of a file.
- Parameters:
-
filename | The name of the file containing the disks. |
- Returns:
- A list with the disks readen out of the file.
std::list< Disk * > * Disk::loadDiskListDBFile |
( |
std::string |
filename ) |
[static] |
Using this method it is possible to read a list of disks out of a sqlite db file.
- Parameters:
-
filename | The name of the file containing the disks. |
- Returns:
- A list with the disks readen out of the file.
void Disk::setCapacity |
( |
int64_t |
capacity ) |
|
Set the Capacity of the Disk in bytes. (This can also be in any other scale, but has to be same for ExtentSize of Distributor)
- Parameters:
-
capacity | Capacity of the Disk in bytes. (This can also be in any other scale, but has to be same for ExtentSize of Distributor) |
void Disk::setData |
( |
void * |
data ) |
|
Set the Pointer to be used by developer instantiating this disk. May not be changed by Distributors!
- Parameters:
-
data | Pointer to be used by developer instantiating this disk. May not be changed by Distributors! |
void Disk::setId |
( |
int64_t |
id ) |
|
Set the ID of the disk. Has to be unique all over this library.
- Parameters:
-
id | ID of the disk. Has to be unique all over this library. |
void Disk::storeDiskList |
( |
std::list< Disk * > * |
disks, |
|
|
std::string |
filename |
|
) |
| [static] |
Using this method it is possible to store a list of disks in a file.
- Parameters:
-
disks | The disks to be stored |
filename | The name of the file the disks shall be stored in. |
void Disk::storeDiskListDBFile |
( |
std::list< Disk * > * |
disks, |
|
|
std::string |
filename |
|
) |
| [static] |
Using this method it is possible to store a list of disks in a sqlite db file.
- Parameters:
-
disks | The disks to be stored |
filename | The name of the file the disks shall be stored in. |
xercesc::DOMElement * Disk::toXML |
( |
xercesc::DOMDocument * |
doc ) |
[virtual] |
build an XML-Version of this object
- Parameters:
-
doc | the document needed to create new XML Elements |
- Returns:
- a new Element containing the description of this object.
The documentation for this class was generated from the following files: