29
29
class SxeRecord : public QObject {
32
/*! \brief A class used for keeping track of the values at each version.
33
* Note that this info could be retrieved by analyzing the Edits but would be more troublesome
37
/*! \brief Default constructor */
38
VersionData(QString _parent = QString(), /*QString _ns = QString(),*/ QString _identifier = QString(), QString _data = QString());
39
/*! \brief Copy constructor */
40
VersionData(const VersionData &other);
51
33
/*! \brief Constructor
52
34
* Constructs a SxeRecordEdit for \a node.
58
40
/*! \brief Returns the node that the record underlies. */
59
41
QDomNode node() const;
60
42
/*! \brief Applies \a edit to the node. Takes ownership of \a edit. */
61
void apply(QDomDocument &doc, SxeEdit* edit, bool importing);
43
void apply(QDomDocument &doc, SxeEdit* edit);
62
44
/*! \brief Returns a list of edits to the node.*/
63
45
QList<const SxeEdit*> edits() const;
64
46
/*! \brief Returns the rid of the node that the record belongs to. */
121
/*! \brief Applies SxeNewEdit \a edit to the node.*/
122
bool applySxeNewEdit(QDomDocument &doc, const SxeNewEdit* edit);
123
/*! \brief Applies SxeRemoveEdit \a edit to the node.*/
124
bool applySxeRemoveEdit(const SxeRemoveEdit* edit);
125
/*! \brief Applies SxeRecordEdit \a edit to the node.*/
126
bool applySxeRecordEdit(const SxeRecordEdit* edit, bool importing = false);
103
/*! \brief Applies SxeNewEdit \a edit to the record.*/
104
bool applySxeNewEdit(QDomDocument &doc, SxeNewEdit* edit);
105
/*! \brief Applies SxeRemoveEdit \a edit to the record.*/
106
bool applySxeRemoveEdit(SxeRemoveEdit* edit);
107
/*! \brief Applies SxeRecordEdit \a edit to the record.*/
108
bool applySxeRecordEdit(SxeRecordEdit* edit);
110
/*! \brief Applies an individual SxeRecordEdit assuming it can be applied to the current version.*/
111
void processInOrderRecordEdit(const SxeRecordEdit* edit);
112
/*! \brief Reorder the edits_ list and reapply edits as necessary. */
114
/*! \brief Revert the record to version 0. */
117
/*! \brief Synchronize the state of the DOM node with the fields of the record. */
118
void updateNode(bool remote);
128
120
QList<SxeEdit*> edits_;
129
QList<VersionData*> versions_;
127
/* The last* variants hold the values that were last put to the DOM node.*/
128
QString parent_, lastParent_;
129
double primaryWeight_, lastPrimaryWeight_;
130
QString identifier_, lastIdentifier_;
131
QString data_, lastData_;