xref: /haiku/src/apps/icon-o-matic/generic/command/Command.cpp (revision 1acbe440b8dd798953bec31d18ee589aa3f71b73)
1 /*
2  * Copyright 2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 
9 #include "Command.h"
10 
11 #include <stdio.h>
12 
13 #include <OS.h>
14 
15 // constructor
16 Command::Command()
17 	: fTimeStamp(system_time())
18 {
19 }
20 
21 // destructor
22 Command::~Command()
23 {
24 }
25 
26 // InitCheck
27 status_t
28 Command::InitCheck()
29 {
30 	return B_NO_INIT;
31 }
32 
33 // Perform
34 status_t
35 Command::Perform()
36 {
37 	return B_ERROR;
38 }
39 
40 // Undo
41 status_t
42 Command::Undo()
43 {
44 	return B_ERROR;
45 }
46 
47 // Redo
48 status_t
49 Command::Redo()
50 {
51 	return Perform();
52 }
53 
54 // GetName
55 void
56 Command::GetName(BString& name)
57 {
58 	name << "Name of action goes here.";
59 }
60 
61 // CombineWithNext
62 bool
63 Command::CombineWithNext(const Command* next)
64 {
65 	return false;
66 }
67 
68 // CombineWithPrevious
69 bool
70 Command::CombineWithPrevious(const Command* previous)
71 {
72 	return false;
73 }
74 
75 
76 // _GetString
77 const char*
78 Command::_GetString(uint32 key, const char* defaultString) const
79 {
80 //	if (LanguageManager* manager = LanguageManager::Default())
81 //		return manager->GetString(key, defaultString);
82 //	else
83 		return defaultString;
84 }
85