C:/Documents and Settings/mtauraso/Desktop/proj3/projectX/PlayScriptCommand.cpp

Go to the documentation of this file.
00001 #include "CommandManager.h"
00002 #include "Command.h"
00003 #include "List.h"
00004 
00005 using namespace std;
00006 
00007 const std::string PlayScriptCommand::_id = "playScript";
00008 
00009 PlayScriptCommand::PlayScriptCommand(std::string filename)
00010 :_filename(filename)
00011 {
00012 
00013 }
00014 
00015 PlayScriptCommand::PlayScriptCommand(List *command)
00016 {
00017         command = command->rest();
00018         _filename = command->firstString();
00019 }
00020 
00021 void PlayScriptCommand::execute()
00022 {
00023         CommandManager::instance()->startPlaying(_filename);
00024 }
00025 
00026 std::string PlayScriptCommand::getString()
00027 {
00028         List *command = new List();
00029         command->snoc(new Atom(_id));
00030         command->snoc(new Atom(_filename));
00031         string commandString = command->getString();
00032         delete command;
00033 
00034         return commandString;
00035 }

Generated on Sat Apr 22 15:05:20 2006 for ProjectX by  doxygen 1.4.6-NO