base class for data ready to be shared on network More...
#include <Types/Data.h>
Public Types | |
enum | SegmentDataIdentifier { SDI_Version = 10, SDI_Patient = 100, SDI_Operation = 200, SDI_File = 300 } |
Public Member Functions | |
Data (const QString &category, QObject *parent=0) | |
virtual QByteArray | data () const =0 |
Gets the data in the form of a QByteArray (ready to be shared on the network). | |
virtual int | load (const QByteArray &data, int index=0)=0 |
load some data from a QByteArray | |
const QString & | category () const |
Returns the category. | |
Static Public Member Functions | |
static void | factory (Patient *pPatient, const QByteArray &data, int index=0, int *nbRead=NULL) |
Read all the Data available in data and fill pPatient with. | |
Protected Attributes | |
QString | m_category |
base class for data ready to be shared on network
Identifier to recognise data when receiving messages from the network
Data::Data | ( | const QString & | category, | |
QObject * | parent = 0 | |||
) | [inline] |
category | the category of the data (kind of folder for Patient) | |
parent |
QByteArray Data::data | ( | ) | const [pure virtual] |
Gets the data in the form of a QByteArray (ready to be shared on the network).
Implemented in FileData, ListData< T >, OperationData, PatientData, and VersionData.
static void Data::factory | ( | Patient * | pPatient, | |
const QByteArray & | data, | |||
int | index = 0 , |
|||
int * | nbRead = NULL | |||
) | [static] |
int Data::load | ( | const QByteArray & | data, | |
int | index = 0 | |||
) | [pure virtual] |
load some data from a QByteArray
data | the data to load | |
index | the where to read |
Implemented in FileData, ListData< T >, OperationData, PatientData, and VersionData.
QString Data::m_category [protected] |