OpendTect  7.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ChangeRecorder Class Referenceabstract

base class for recorder of changes in a MonitoredObject More...

Inheritance diagram for ChangeRecorder:
[legend]

Classes

class  Record
 

Public Types

enum  Action { Undo , Redo }
 
- Public Types inherited from MonitoredObject
typedef CNotifier< MonitoredObject, ChangeDataChangeDataNotifier
 
typedef int ChangeType
 
typedef std::int64_t IDType
 
typedef Threads ::Locker Locker
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 ChangeRecorder (const ChangeRecorder &)
 
 ~ChangeRecorder ()
 
bool apply (Action)
 
bool canApply (Action) const
 
ChangeRecorderclone () const override
 
ChangeType compareWith (const MonitoredObject &) const override
 
bool isEmpty () const
 
bool operator!= (const ChangeRecorder &oth) const
 
ChangeRecorderoperator= (const ChangeRecorder &)
 
bool operator== (const ChangeRecorder &) const
 
void setEmpty ()
 
uiString usrText (Action) const
 
- Public Member Functions inherited from NamedMonitoredObject
 NamedMonitoredObject (const char *nm=0)
 
 NamedMonitoredObject (const NamedMonitoredObject &)
 
 NamedMonitoredObject (const NamedObject &)
 
virtual ~NamedMonitoredObject ()
 
NamedMonitoredObjectclone () const override
 
ChangeType compareWith (const MonitoredObject &) const override
 
NamedMonitoredObjectgetClone () const override
 
BufferString getName () const override
 
bool operator!= (const NamedMonitoredObject &oth) const
 
NamedMonitoredObjectoperator= (const NamedMonitoredObject &)
 
bool operator== (const NamedMonitoredObject &) const
 
void setName (const char *) override
 
- Public Member Functions inherited from MonitoredObject
 MonitoredObject (const MonitoredObject &)
 
virtual ~MonitoredObject ()
 
virtual DirtyCountType dirtyCount () const
 
virtual ChangeDataNotifierobjectChanged () const
 
virtual Notifier< MonitoredObject > & objectToBeDeleted () const
 
MonitoredObjectoperator= (const MonitoredObject &)
 
bool operator== (const MonitoredObject &) const
 
void sendChangeNotification (const ChangeData &) const
 
void sendEntireObjectChangeNotification () const
 
virtual void touch () const
 
void transferNotifsTo (const MonitoredObject &, const CallBacker *onlyfor=0) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Protected Types

typedef ObjectSet< Record >::idx_type idx_type
 

Protected Member Functions

 ChangeRecorder (const MonitoredObject &, const char *)
 
 ChangeRecorder (MonitoredObject &, const char *nm)
 
void addRec (Record *)
 
void clear ()
 
void copyAll (const ChangeRecorder &)
 
idx_type gtIdx (Action) const
 
virtual void handleObjChange (const ChangeData &)=0
 
void objChg (CallBacker *)
 
void objDel (CallBacker *)
 
- Protected Member Functions inherited from NamedMonitoredObject
void copyAll (const NamedMonitoredObject &)
 
- Protected Member Functions inherited from MonitoredObject
 MonitoredObject ()
 
void copyAll (const MonitoredObject &)
 
template<class T >
getMemberSimple (const T &) const
 the get function used by mImplSimpleMonitoredGet More...
 
void resumeChangeNotifications () const
 
void sendChgNotif (AccessLocker &, ChangeType, IDType) const
 calls objectChanged with released lock More...
 
void sendChgNotif (AccessLocker &, const ChangeData &) const
 calls objectChanged with released lock More...
 
void sendDelNotif () const
 
template<class TMember , class TSetTo >
void setMemberSimple (TMember &, TSetTo, ChangeType, IDType)
 the set function used by mImplSimpleMonitoredSet More...
 
void stopChangeNotifications () const
 

Protected Attributes

bool applying_
 
idx_type idx4redo_
 
MonitoredObjectobj_
 
ObjectSet< Recordrecs_
 
- Protected Attributes inherited from MonitoredObject
Threads::Lock accesslock_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

ChangeType compareClassData (const ChangeRecorder &) const
 
void copyClassData (const ChangeRecorder &)
 
void init ()
 

Additional Inherited Members

- Static Public Member Functions inherited from NamedMonitoredObject
static ChangeType cNameChange ()
 
static Notifier< NamedMonitoredObject > & instanceCreated ()
 
- Static Public Member Functions inherited from MonitoredObject
static ChangeType cEntireObjectChange ()
 
static IDType cEntireObjectChgID ()
 
static ChangeType changeNotificationTypeOf (CallBacker *)
 
static ChangeType cNoChange ()
 
static IDType cUnspecChgID ()
 
static Notifier< MonitoredObject > & instanceCreated ()
 defines static instanceCreated() More...
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

base class for recorder of changes in a MonitoredObject

<>

Member Typedef Documentation

◆ idx_type

Member Enumeration Documentation

◆ Action

Enumerator
Undo 
Redo 

Constructor & Destructor Documentation

◆ ~ChangeRecorder()

ChangeRecorder::~ChangeRecorder ( )

◆ ChangeRecorder() [1/3]

ChangeRecorder::ChangeRecorder ( const ChangeRecorder )

◆ ChangeRecorder() [2/3]

ChangeRecorder::ChangeRecorder ( MonitoredObject ,
const char *  nm 
)
protected

◆ ChangeRecorder() [3/3]

ChangeRecorder::ChangeRecorder ( const MonitoredObject ,
const char *   
)
protected

Member Function Documentation

◆ addRec()

void ChangeRecorder::addRec ( Record )
protected

◆ apply()

bool ChangeRecorder::apply ( Action  )

◆ canApply()

bool ChangeRecorder::canApply ( Action  ) const

◆ clear()

void ChangeRecorder::clear ( )
protected

◆ clone()

ChangeRecorder* ChangeRecorder::clone ( ) const
inlineoverridevirtual

Reimplemented from MonitoredObject.

◆ compareClassData()

ChangeType ChangeRecorder::compareClassData ( const ChangeRecorder ) const
private

◆ compareWith()

ChangeType ChangeRecorder::compareWith ( const MonitoredObject ) const
overridevirtual

Reimplemented from MonitoredObject.

◆ copyAll()

void ChangeRecorder::copyAll ( const ChangeRecorder )
protected

◆ copyClassData()

void ChangeRecorder::copyClassData ( const ChangeRecorder )
private

◆ gtIdx()

idx_type ChangeRecorder::gtIdx ( Action  ) const
protected

◆ handleObjChange()

virtual void ChangeRecorder::handleObjChange ( const ChangeData )
protectedpure virtual

◆ init()

void ChangeRecorder::init ( )
private

◆ isEmpty()

bool ChangeRecorder::isEmpty ( ) const

◆ objChg()

void ChangeRecorder::objChg ( CallBacker )
protected

◆ objDel()

void ChangeRecorder::objDel ( CallBacker )
protected

◆ operator!=()

bool ChangeRecorder::operator!= ( const ChangeRecorder oth) const
inline

◆ operator=()

ChangeRecorder& ChangeRecorder::operator= ( const ChangeRecorder )

◆ operator==()

bool ChangeRecorder::operator== ( const ChangeRecorder ) const

◆ setEmpty()

void ChangeRecorder::setEmpty ( )

◆ usrText()

uiString ChangeRecorder::usrText ( Action  ) const

Member Data Documentation

◆ applying_

bool ChangeRecorder::applying_
protected

◆ idx4redo_

idx_type ChangeRecorder::idx4redo_
protected

◆ obj_

MonitoredObject* ChangeRecorder::obj_
protected

◆ recs_

ObjectSet<Record> ChangeRecorder::recs_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024