xref: /haiku/src/apps/haikudepot/edits_generic/UndoableEdit.cpp (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2006-2012, Stephan Aßmus <superstippi@gmx.de>
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include "UndoableEdit.h"
7 
8 #include <stdio.h>
9 
10 #include <OS.h>
11 #include <String.h>
12 
13 
14 //static int32 sInstanceCount = 0;
15 
16 
17 UndoableEdit::UndoableEdit()
18 	:
19 	fTimeStamp(system_time())
20 {
21 //	sInstanceCount++;
22 //	printf("UndoableEdits: %ld\n", sInstanceCount);
23 }
24 
25 
26 UndoableEdit::~UndoableEdit()
27 {
28 //	sInstanceCount--;
29 //	printf("UndoableEdits: %ld\n", sInstanceCount);
30 }
31 
32 
33 status_t
34 UndoableEdit::InitCheck()
35 {
36 	return B_NO_INIT;
37 }
38 
39 
40 status_t
41 UndoableEdit::Perform(EditContext& context)
42 {
43 	return B_ERROR;
44 }
45 
46 
47 status_t
48 UndoableEdit::Undo(EditContext& context)
49 {
50 	return B_ERROR;
51 }
52 
53 
54 status_t
55 UndoableEdit::Redo(EditContext& context)
56 {
57 	return Perform(context);
58 }
59 
60 
61 void
62 UndoableEdit::GetName(BString& name)
63 {
64 	name << "Name of edit goes here.";
65 }
66 
67 
68 bool
69 UndoableEdit::UndoesPrevious(const UndoableEdit* previous)
70 {
71 	return false;
72 }
73 
74 
75 bool
76 UndoableEdit::CombineWithNext(const UndoableEdit* next)
77 {
78 	return false;
79 }
80 
81 
82 bool
83 UndoableEdit::CombineWithPrevious(const UndoableEdit* previous)
84 {
85 	return false;
86 }
87