Class to describe a storable item.
More...
#include <StorageItem.h>
|
| StorageItem () |
| Constructor.
|
|
virtual | ~StorageItem () |
| Destructor.
|
|
void | setId (const QString &aId) |
| Sets the id of the item.
|
|
const QString & | getId () const |
| Returns the id of the item.
|
|
void | setParentId (const QString &aParentId) |
| Sets the id of the parent of this item.
|
|
const QString & | getParentId () const |
| Returns the id of the parent of this item.
|
|
void | setType (const QString &aType) |
| Sets the type of this item.
|
|
const QString & | getType () const |
| Gets the type of this item.
|
|
void | setVersion (const QString &aVersion) |
| Sets the version of this item.
|
|
const QString & | getVersion () const |
| Gets the version of this item.
|
|
virtual bool | write (qint64 aOffset, const QByteArray &aData)=0 |
| Write (part of) the item data.
|
|
virtual bool | read (qint64 aOffset, qint64 aLength, QByteArray &aData) const =0 |
| Read (part of) the item data.
|
|
virtual bool | resize (qint64 aLen)=0 |
| Sets the length of the item data.
|
|
virtual qint64 | getSize () const =0 |
| Get the size of the item data.
|
|
Class to describe a storable item.
◆ StorageItem()
StorageItem::StorageItem |
( |
| ) |
|
◆ ~StorageItem()
StorageItem::~StorageItem |
( |
| ) |
|
|
virtual |
◆ getId()
const QString & StorageItem::getId |
( |
| ) |
const |
Returns the id of the item.
- Returns
- Id of the item
◆ getParentId()
const QString & StorageItem::getParentId |
( |
| ) |
const |
Returns the id of the parent of this item.
- Returns
- Id of the parent of this item
◆ getSize()
virtual qint64 Buteo::StorageItem::getSize |
( |
| ) |
const |
|
pure virtual |
Get the size of the item data.
- Returns
- The data size in bytes
◆ getType()
const QString & StorageItem::getType |
( |
| ) |
const |
Gets the type of this item.
- Returns
- Type of this item
◆ getVersion()
const QString & StorageItem::getVersion |
( |
| ) |
const |
Gets the version of this item.
- Returns
- Version of this item
◆ read()
virtual bool Buteo::StorageItem::read |
( |
qint64 |
aOffset, |
|
|
qint64 |
aLength, |
|
|
QByteArray & |
aData |
|
) |
| const |
|
pure virtual |
Read (part of) the item data.
- Parameters
-
aOffset | The offset in bytes from where the data is read |
aLength | The number of bytes to read |
aData | Data buffer where to place data |
- Returns
- True on success, otherwise false
◆ resize()
virtual bool Buteo::StorageItem::resize |
( |
qint64 |
aLen | ) |
|
|
pure virtual |
Sets the length of the item data.
- Parameters
-
aLen | Length to set for item data |
- Returns
- True on success, otherwise false
◆ setId()
void StorageItem::setId |
( |
const QString & |
aId | ) |
|
Sets the id of the item.
- Parameters
-
◆ setParentId()
void StorageItem::setParentId |
( |
const QString & |
aParentId | ) |
|
Sets the id of the parent of this item.
- Parameters
-
aParentId | The id of the parent of item |
◆ setType()
void StorageItem::setType |
( |
const QString & |
aType | ) |
|
Sets the type of this item.
- Parameters
-
◆ setVersion()
void StorageItem::setVersion |
( |
const QString & |
aVersion | ) |
|
Sets the version of this item.
- Parameters
-
aVersion | Version of this item |
◆ write()
virtual bool Buteo::StorageItem::write |
( |
qint64 |
aOffset, |
|
|
const QByteArray & |
aData |
|
) |
| |
|
pure virtual |
Write (part of) the item data.
- Parameters
-
aOffset | Offset to start writing from |
aData | Data buffer to write. All bytes from buffer are written |
- Returns
- True on success, otherwise false
The documentation for this class was generated from the following files: