19 #ifndef LIB_QUENTIER_TYPES_I_NOTE_STORE_DATA_ELEMENT_H 20 #define LIB_QUENTIER_TYPES_I_NOTE_STORE_DATA_ELEMENT_H 22 #include "ILocalStorageDataElement.h" 24 #include <quentier/types/ErrorString.h> 25 #include <quentier/utility/Printable.h> 37 virtual void clear() = 0;
39 virtual bool hasGuid()
const = 0;
40 virtual const QString & guid()
const = 0;
41 virtual void setGuid(
const QString & guid) = 0;
43 virtual bool hasUpdateSequenceNumber()
const = 0;
44 virtual qint32 updateSequenceNumber()
const = 0;
45 virtual void setUpdateSequenceNumber(
const qint32 usn) = 0;
47 virtual bool checkParameters(
ErrorString & errorDescription)
const = 0;
49 virtual bool isDirty()
const = 0;
50 virtual void setDirty(
const bool dirty) = 0;
52 virtual bool isLocal()
const = 0;
53 virtual void setLocal(
const bool local) = 0;
58 #define DECLARE_IS_DIRTY \ 59 virtual bool isDirty() const override; \ 62 #define DECLARE_SET_DIRTY \ 63 virtual void setDirty(const bool isDirty) override; \ 66 #define QN_DECLARE_DIRTY \ 71 #define DEFINE_IS_DIRTY(type) \ 72 bool type::isDirty() const { \ 73 return d->m_isDirty; \ 77 #define DEFINE_SET_DIRTY(type) \ 78 void type::setDirty(const bool dirty) { \ 79 d->m_isDirty = dirty; \ 83 #define QN_DEFINE_DIRTY(type) \ 84 DEFINE_IS_DIRTY(type) \ 85 DEFINE_SET_DIRTY(type) \ 88 #define DECLARE_IS_LOCAL \ 89 virtual bool isLocal() const override; \ 92 #define DECLARE_SET_LOCAL \ 93 virtual void setLocal(const bool isLocal) override; \ 96 #define QN_DECLARE_LOCAL \ 101 #define DEFINE_IS_LOCAL(type) \ 102 bool type::isLocal() const { \ 103 return d->m_isLocal; \ 107 #define DEFINE_SET_LOCAL(type) \ 108 void type::setLocal(const bool local) { \ 109 d->m_isLocal = local; \ 113 #define QN_DEFINE_LOCAL(type) \ 114 DEFINE_IS_LOCAL(type) \ 115 DEFINE_SET_LOCAL(type) \ 120 #endif // LIB_QUENTIER_TYPES_I_NOTE_STORE_DATA_ELEMENT_H Definition: INoteStoreDataElement.h:32
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition: ErrorString.h:43
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition: Printable.h:38
Definition: ILocalStorageDataElement.h:31