00001 #ifndef _INSTRUCTIONS_RESET_VIEWER_H_
00002 #define _INSTRUCTIONS_RESET_VIEWER_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00030 #include "../../IPSA.h"
00031 #include "../../IpsaSimulator.h"
00032 #include "Instruction.h"
00033
00034 #include <map>
00035 #include <vector>
00036 #include <string>
00037 #include <sstream>
00038
00039 class IPSA_VIEWER_IMPORT_EXPORT ResetViewer : public Instruction
00040 {
00041 public:
00042 ResetViewer(IpsaSimulator* simulator, const std::string& code = std::string("reload"))
00043 :Instruction(code), ipsaSimulator(simulator) {;}
00044 protected:
00045 virtual tExecResultType vExecute(std::vector<std::string>& Instr, std::ostringstream& answer, unsigned int& numberOfReturnValues);
00046 IpsaSimulator* ipsaSimulator;
00047
00048 };
00049
00050 inline Instruction::tExecResultType ResetViewer::vExecute(std::vector<std::string>& Instr, std::ostringstream& answer, unsigned int& numberOfReturnValues)
00051 {
00052 #ifdef WIN32
00053 Instr;
00054 #endif // WIN32
00055 numberOfReturnValues = 0;
00056 answer << "Resetting viewer.\r\n" << std::endl;
00057 ipsaSimulator->reset();
00058 return eOK;
00059 }
00060
00061 #endif