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 // UndoesPrevious 62 bool 63 Command::UndoesPrevious(const Command* previous) 64 { 65 return false; 66 } 67 68 // CombineWithNext 69 bool 70 Command::CombineWithNext(const Command* next) 71 { 72 return false; 73 } 74 75 // CombineWithPrevious 76 bool 77 Command::CombineWithPrevious(const Command* previous) 78 { 79 return false; 80 } 81 82 83 // _GetString 84 const char* 85 Command::_GetString(uint32 key, const char* defaultString) const 86 { 87 // if (LanguageManager* manager = LanguageManager::Default()) 88 // return manager->GetString(key, defaultString); 89 // else 90 return defaultString; 91 } 92