#include <pp_Revision.h>
Public Member Functions | |
PP_Revision (UT_uint32 Id, PP_RevisionType eType, const gchar *props, const gchar *attrs) | |
PP_Revision (UT_uint32 Id, PP_RevisionType eType, const PP_PropertyVector &props, const PP_PropertyVector &attrs) | |
virtual | ~PP_Revision () |
UT_uint32 | getId () const |
void | setId (UT_uint32 iId) |
PP_RevisionType | getType () const |
void | setType (PP_RevisionType t) |
const gchar * | getPropsString () const |
const gchar * | getAttrsString () const |
bool | setAttributes (const std::vector< std::string > &attributes) |
bool | operator== (const PP_Revision &op2) const |
std::string | toString () const |
bool | onlyContainsAbiwordChangeTrackingMarkup () const |
Private Member Functions | |
void | _refreshString () const |
bool | _handleNestedRevAttr () |
Private Attributes | |
UT_uint32 | m_iID |
PP_RevisionType | m_eType |
UT_String | m_sXMLProps |
UT_String | m_sXMLAttrs |
bool | m_bDirty |
PP_Revision is a class that encapsulates a single revision, holding its id, type and associated properties and attributes. It provides functions for retrieving information and from merging properties
PP_Revision::PP_Revision | ( | UT_uint32 | Id, | |
PP_RevisionType | eType, | |||
const gchar * | props, | |||
const gchar * | attrs | |||
) |
References FREEP, PP_AttrProp::setAttribute(), PP_AttrProp::setProperty(), UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_if_fail, and v.
PP_Revision::PP_Revision | ( | UT_uint32 | Id, | |
PP_RevisionType | eType, | |||
const PP_PropertyVector & | props, | |||
const PP_PropertyVector & | attrs | |||
) |
References setAttributes(), and PP_AttrProp::setProperties().
virtual PP_Revision::~PP_Revision | ( | ) | [inline, virtual] |
bool PP_Revision::_handleNestedRevAttr | ( | ) | [private] |
References gchar, PP_AttrProp::getAttribute(), PP_AttrProp::getAttributes(), PP_RevisionAttr::getNthRevision(), PP_AttrProp::getProperties(), PP_RevisionAttr::getRevisionsCount(), getType(), PP_REVISION_ADDITION, PP_AttrProp::prune(), PP_AttrProp::setAttribute(), setAttributes(), PP_AttrProp::setProperties(), and UT_return_val_if_fail.
void PP_Revision::_refreshString | ( | ) | const [private] |
References UT_String::clear(), gchar, PP_AttrProp::getAttributeCount(), PP_AttrProp::getNthAttribute(), PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), m_bDirty, m_sXMLAttrs, and m_sXMLProps.
Referenced by getAttrsString(), and getPropsString().
const gchar * PP_Revision::getAttrsString | ( | ) | const |
converts the internal vector of attributes into XML string
References _refreshString(), UT_String::c_str(), gchar, m_bDirty, and m_sXMLAttrs.
Referenced by PP_RevisionAttr::addRevision(), PP_RevisionAttr::mergeAll(), PP_RevisionAttr::mergeAttrIfNotAlreadyThere(), and toString().
UT_uint32 PP_Revision::getId | ( | ) | const [inline] |
Referenced by PD_Document::_acceptRejectRevision(), IE_Exp_RTF::_output_revision(), PP_RevisionAttr::addRevision(), PP_RevisionAttr::changeRevisionId(), PP_RevisionAttr::changeRevisionType(), pt_PieceTable::deleteSpan(), fp_Run::draw(), PD_Document::explodeRevisions(), PP_RevisionAttr::getGreatestLesserOrEqualRevision(), PP_RevisionAttr::getHighestId(), PP_RevisionAttr::getLastRevision(), PP_RevisionAttr::getLowestGreaterOrEqualRevision(), PP_RevisionAttr::getRevisionWithId(), PP_RevisionAttr::mergeAll(), PP_RevisionAttr::mergeAttrIfNotAlreadyThere(), operator==(), PP_RevisionAttr::removeAllLesserOrEqualIds(), PP_RevisionAttr::removeRevisionIdTypeless(), PP_RevisionAttr::removeRevisionIdWithType(), toIndex(), and toString().
const gchar * PP_Revision::getPropsString | ( | ) | const |
converts the internal vector of properties into XML string
References _refreshString(), UT_String::c_str(), gchar, m_bDirty, and m_sXMLProps.
Referenced by PP_RevisionAttr::addRevision(), PP_RevisionAttr::mergeAll(), and toString().
PP_RevisionType PP_Revision::getType | ( | void | ) | const [inline] |
Referenced by PD_Document::_acceptRejectRevision(), _handleNestedRevAttr(), IE_Exp_RTF::_output_revision(), PP_RevisionAttr::addRevision(), pt_PieceTable::deleteSpan(), fp_Run::draw(), PD_Document::explodeRevisions(), PP_RevisionAttr::getGreatestLesserOrEqualRevision(), PP_RevisionAttr::getLowestDeletionRevision(), PP_RevisionAttr::getType(), PP_RevisionAttr::isVisible(), PP_RevisionAttr::mergeAll(), PP_RevisionAttr::mergeAttrIfNotAlreadyThere(), operator==(), PP_RevisionAttr::pruneForCumulativeResult(), PP_RevisionAttr::removeRevisionIdWithType(), toIndex(), and toString().
bool PP_Revision::onlyContainsAbiwordChangeTrackingMarkup | ( | ) | const |
bool PP_Revision::operator== | ( | const PP_Revision & | op2 | ) | const |
bool PP_Revision::setAttributes | ( | const std::vector< std::string > & | attributes | ) |
void PP_Revision::setId | ( | UT_uint32 | iId | ) | [inline] |
References UT_ASSERT_HARMLESS.
Referenced by PP_RevisionAttr::changeRevisionId().
void PP_Revision::setType | ( | PP_RevisionType | t | ) | [inline] |
Referenced by PP_RevisionAttr::changeRevisionType().
std::string PP_Revision::toString | ( | ) | const |
References getAttrsString(), getId(), getPropsString(), getType(), PP_AttrProp::hasAttributes(), PP_AttrProp::hasProperties(), PP_REVISION_DELETION, and PP_REVISION_FMT_CHANGE.
Referenced by PP_RevisionAttr::_refreshString(), and PP_RevisionAttr::mergeAll().
bool PP_Revision::m_bDirty [mutable, private] |
Referenced by _refreshString(), getAttrsString(), and getPropsString().
PP_RevisionType PP_Revision::m_eType [private] |
UT_uint32 PP_Revision::m_iID [private] |
UT_String PP_Revision::m_sXMLAttrs [mutable, private] |
Referenced by _refreshString(), and getAttrsString().
UT_String PP_Revision::m_sXMLProps [mutable, private] |
Referenced by _refreshString(), and getPropsString().