OpenASIP
2.0
|
#include <SimulatorCmdLineOptions.hh>
Public Member Functions | |
SimulatorCmdLineOptions () | |
virtual | ~SimulatorCmdLineOptions () |
virtual void | printVersion () const |
virtual void | printHelp () const |
bool | debugMode () |
std::string | scriptString () |
std::string | machineFile () |
std::string | programFile () |
SimulatorFrontend::SimulationType | backendType () |
Public Member Functions inherited from CmdLineOptions | |
CmdLineOptions (std::string description, std::string version="") | |
virtual | ~CmdLineOptions () |
void | parse (char *argv[], int argc) |
void | parse (std::string argv[], int argc) |
void | parse (std::vector< std::string > argv) |
virtual bool | isVerboseSwitchDefined () const |
virtual bool | isVerboseSpamSwitchDefined () const |
Public Member Functions inherited from CmdLineParser | |
CmdLineParser (std::string description) | |
virtual | ~CmdLineParser () |
virtual void | storeOptions (Options &options) |
virtual int | numberOfArguments () const |
virtual std::string | argument (int index) const |
Private Member Functions | |
SimulatorCmdLineOptions (const SimulatorCmdLineOptions &) | |
Copying not allowed. More... | |
SimulatorCmdLineOptions & | operator= (const SimulatorCmdLineOptions &) |
Assignment not allowed. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptions | |
bool | optionGiven (std::string key) const |
Protected Member Functions inherited from CmdLineParser | |
void | addOption (CmdLineOptionParser *opt) |
CmdLineOptionParser * | findOption (std::string name) const |
bool | parseOption (std::string option, std::string &name, std::string &arguments, std::string &prefix, bool &hasArgument) const |
bool | readPrefix (std::string &option, std::string &prefix, bool &longOption) const |
bool | isPrefix (std::string name) const |
Protected Attributes inherited from CmdLineParser | |
std::map< std::string, CmdLineOptionParser * > | optionLongNames_ |
Database for holding options with their long names as a key. More... | |
std::map< std::string, CmdLineOptionParser * > | optionShortNames_ |
Database for holding options with their short names as a key. More... | |
std::vector< std::string > | commandLine_ |
Command line is stored here. More... | |
std::vector< std::string > | arguments_ |
Command line arguments are stored here. More... | |
std::vector< std::string > | prefixes_ |
Legal prefixes are stored here. More... | |
Command line option class for Simulator.
Definition at line 45 of file SimulatorCmdLineOptions.hh.
SimulatorCmdLineOptions::SimulatorCmdLineOptions | ( | ) |
Constructor.
Definition at line 82 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::addOption(), SWL_CUSTOM_DBG, SWL_DEBUG_MODE, SWL_EXECUTE_SCRIPT, SWL_FAST_SIM, SWL_MACHINE_TO_LOAD, SWL_PROGRAM_TO_LOAD, SWL_REMOTE_DBG, SWS_CUSTOM_DBG, SWS_DEBUG_MODE, SWS_EXECUTE_SCRIPT, SWS_FAST_SIM, SWS_MACHINE_TO_LOAD, SWS_PROGRAM_TO_LOAD, and SWS_REMOTE_DBG.
|
virtual |
|
private |
Copying not allowed.
SimulatorFrontend::SimulationType SimulatorCmdLineOptions::backendType | ( | ) |
Check what sort of simulation user asked for on the command line.
If no value is given in the parsed command line the "normal" simulation, i.e. the interpreted, non-compiled, version is returned.
Definition at line 209 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), CmdLineOptions::optionGiven(), SimulatorFrontend::SIM_COMPILED, SimulatorFrontend::SIM_CUSTOM, SimulatorFrontend::SIM_NORMAL, SimulatorFrontend::SIM_REMOTE, SWL_CUSTOM_DBG, SWL_FAST_SIM, and SWL_REMOTE_DBG.
bool SimulatorCmdLineOptions::debugMode | ( | ) |
Returns true if Simulator should be started in debugging mode.
If no value is given in the parsed command line, default one is returned.
Definition at line 158 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), CmdLineOptions::optionGiven(), and SWL_DEBUG_MODE.
std::string SimulatorCmdLineOptions::machineFile | ( | ) |
Returns the filename of the given machine (.adf)
Definition at line 186 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWS_MACHINE_TO_LOAD.
|
private |
Assignment not allowed.
|
virtual |
Prints the help menu of the program.
Reimplemented from CmdLineOptions.
Definition at line 142 of file SimulatorCmdLineOptions.cc.
References CmdLineOptions::printHelp(), printVersion(), Texts::TextGenerator::text(), SimulatorToolbox::textGenerator(), and Texts::TXT_CMD_LINE_HELP.
|
virtual |
Prints the version of the program.
Implements CmdLineOptions.
Definition at line 131 of file SimulatorCmdLineOptions.cc.
References SIM_CLI_TITLE, and Application::TCEVersionString().
Referenced by printHelp().
std::string SimulatorCmdLineOptions::programFile | ( | ) |
Returns the filename of the given program
Definition at line 196 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWS_PROGRAM_TO_LOAD.
std::string SimulatorCmdLineOptions::scriptString | ( | ) |
Returns the script to be executed in the interpreter.
Returns an empty string, if none defined.
Definition at line 173 of file SimulatorCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptions::optionGiven(), CmdLineOptionParser::String(), and SWL_EXECUTE_SCRIPT.