Go to the documentation of this file. 1 #ifndef CNOID_BASE_EDIT_RECORD_H
2 #define CNOID_BASE_EDIT_RECORD_H
4 #include <cnoid/Referenced>
7 #include "exportdecl.h"
15 virtual std::string label()
const = 0;
17 bool applyUndo() {
return !isReverse_ ? undo() : redo(); }
18 bool applyRedo() {
return !isReverse_ ? redo() : undo(); }
20 void flip(){ isReverse_ = !isReverse_; }
28 virtual bool undo() = 0;
29 virtual bool redo() = 0;
44 virtual std::string label()
const override;
47 group_.push_back(record);
49 bool empty()
const {
return group_.empty(); }
53 virtual bool undo()
override;
54 virtual bool redo()
override;
60 std::vector<EditRecordPtr> group_;
Definition: EditRecord.h:38
bool applyRedo()
Definition: EditRecord.h:18
Definition: EditRecord.h:11
bool empty() const
Definition: EditRecord.h:49
void addRecord(EditRecord *record)
Definition: EditRecord.h:46
bool isReverse() const
Definition: EditRecord.h:21
Definition: Referenced.h:103
Definition: AbstractSceneLoader.h:11
void flip()
Definition: EditRecord.h:20
Definition: Referenced.h:54
ref_ptr< EditRecord > EditRecordPtr
Definition: EditRecord.h:35
ref_ptr< EditRecordGroup > EditRecordGroupPtr
Definition: EditRecord.h:64
int numRecords() const
Definition: EditRecord.h:50
EditRecord * record(int index)
Definition: EditRecord.h:51
bool applyUndo()
Definition: EditRecord.h:17