54 void setId(
const QString &aId);
60 const QString &
getId()
const;
78 void setType(
const QString &aType);
104 virtual bool write(qint64 aOffset,
const QByteArray &aData) = 0;
113 virtual bool read(qint64 aOffset, qint64 aLength, QByteArray &aData)
const = 0;
Class to describe a storable item.
Definition: StorageItem.h:37
void setVersion(const QString &aVersion)
Sets the version of this item.
Definition: StorageItem.cpp:65
virtual bool resize(qint64 aLen)=0
Sets the length of the item data.
const QString & getParentId() const
Returns the id of the parent of this item.
Definition: StorageItem.cpp:50
const QString & getType() const
Gets the type of this item.
Definition: StorageItem.cpp:60
const QString & getId() const
Returns the id of the item.
Definition: StorageItem.cpp:40
void setId(const QString &aId)
Sets the id of the item.
Definition: StorageItem.cpp:35
virtual bool read(qint64 aOffset, qint64 aLength, QByteArray &aData) const =0
Read (part of) the item data.
StorageItem()
Constructor.
Definition: StorageItem.cpp:27
virtual qint64 getSize() const =0
Get the size of the item data.
virtual bool write(qint64 aOffset, const QByteArray &aData)=0
Write (part of) the item data.
void setParentId(const QString &aParentId)
Sets the id of the parent of this item.
Definition: StorageItem.cpp:45
const QString & getVersion() const
Gets the version of this item.
Definition: StorageItem.cpp:70
void setType(const QString &aType)
Sets the type of this item.
Definition: StorageItem.cpp:55
virtual ~StorageItem()
Destructor.
Definition: StorageItem.cpp:31