Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PX_CHANGERECORD_H
00022 #define PX_CHANGERECORD_H
00023
00024 #include "ut_types.h"
00025 #include "ut_uuid.h"
00026 #include "pt_Types.h"
00027 #include "pd_Document.h"
00028 #include "pt_PieceTable.h"
00029
00030 class PD_Document;
00031
00032 class ABI_EXPORT PX_ChangeRecord
00033 {
00034 friend class pt_PieceTable;
00035 public:
00036 typedef enum _PXType {
00037 PXT__FIRST__=-1,
00038 PXT_GlobMarker=-1,
00039 PXT_InsertSpan=0,
00040 PXT_DeleteSpan=1,
00041 PXT_ChangeSpan=2,
00042 PXT_InsertStrux=3,
00043 PXT_DeleteStrux=4,
00044 PXT_ChangeStrux=5,
00045 PXT_InsertObject=6,
00046 PXT_DeleteObject=7,
00047 PXT_ChangeObject=8,
00048 PXT_InsertFmtMark=9,
00049 PXT_DeleteFmtMark=10,
00050 PXT_ChangeFmtMark=11,
00051 PXT_ChangePoint=12,
00052 PXT_ListUpdate=13,
00053 PXT_StopList=14,
00054 PXT_UpdateField=15,
00055 PXT_RemoveList=16,
00056 PXT_UpdateLayout=17,
00057 PXT_AddStyle=18,
00058 PXT_RemoveStyle=19,
00059 PXT_CreateDataItem=20,
00060 PXT_ChangeDocProp=21,
00061 PXT_ChangeDocRDF=22,
00062 PXT__LAST__ = 23
00063 }PXType;
00064
00065 PX_ChangeRecord(PXType type,
00066 PT_DocPosition position,
00067 PT_AttrPropIndex indexNewAP,
00068 UT_uint32 iXID);
00069
00070 virtual ~PX_ChangeRecord();
00071
00072 PXType getType(void) const;
00073 PT_DocPosition getPosition(void) const;
00074 PT_AttrPropIndex getIndexAP(void) const;
00075 bool getPersistance(void) const;
00076
00081 inline void setPersistance(bool persistant)
00082 { m_persistant = persistant; }
00083
00084 virtual PX_ChangeRecord* reverse(void) const;
00085 PXType getRevType(void) const;
00086 UT_sint32 getCRNumber(void) const
00087 { return m_iCRNumber;}
00088 UT_uint32 getXID() const {return m_iXID;}
00089
00090 const char * getDocUUID() const;
00091
00092 PD_Document * getDocument(void) const;
00093 void setDocument(const PD_Document * pDoc) const;
00094 bool setCRNumber(void) const;
00095 bool isFromThisDoc(void) const;
00096 void setAdjustment(UT_sint32 iAdj) const;
00097 UT_sint32 getAdjustment(void) const;
00098 #ifdef PT_TEST
00099 virtual void __dump(FILE * fp) const;
00100 void __dump_type(FILE * fp) const;
00101 #endif
00102
00103 protected:
00105 PXType m_type;
00107 PT_DocPosition m_position;
00109 PT_AttrPropIndex m_indexAP;
00111 bool m_persistant;
00112
00113
00114 UT_uint32 m_iXID;
00115 mutable UT_sint32 m_iCRNumber;
00116 mutable PD_Document * m_pDoc;
00117 private:
00118 mutable struct uuid m_MyDocUUID;
00119 mutable UT_sint32 m_iAdjust;
00120 };
00121 #endif