2 * clearmemorycommand.cpp
5 * Created by westcott on 7/6/11.
6 * Copyright 2011 Schloss Lab. All rights reserved.
10 #include "clearmemorycommand.h"
11 #include "referencedb.h"
13 //**********************************************************************************************************************
14 vector<string> ClearMemoryCommand::setParameters(){
16 vector<string> myArray;
20 m->errorOut(e, "ClearMemoryCommand", "setParameters");
24 //**********************************************************************************************************************
25 string ClearMemoryCommand::getHelpString(){
27 string helpString = "";
28 helpString += "The clear.memory command removes saved reference data from memory.\n";
29 helpString += "The clear.memory command should be in the following format: clear.memory().\n";
33 m->errorOut(e, "ClearMemoryCommand", "getHelpString");
37 //**********************************************************************************************************************
39 ClearMemoryCommand::ClearMemoryCommand(string option) {
41 abort = false; calledHelp = false;
43 //allow user to run help
44 if(option == "help") { help(); abort = true; calledHelp = true; }
45 else if(option == "citation") { citation(); abort = true; calledHelp = true;}
48 m->errorOut(e, "ClearMemoryCommand", "ClearMemoryCommand");
53 //**********************************************************************************************************************
55 int ClearMemoryCommand::execute(){
58 if (abort == true) { if (calledHelp) { return 0; } return 2; }
60 ReferenceDB* rdb = ReferenceDB::getInstance();
66 m->errorOut(e, "ClearMemoryCommand", "execute");
70 //**********************************************************************************************************************/