OpenASIP
2.0
|
#include <ExplorerCmdLineOptions.hh>
Public Member Functions | |
ExplorerCmdLineOptions () | |
virtual | ~ExplorerCmdLineOptions () |
virtual void | printVersion () const |
virtual void | printHelp () const |
std::string | explorerPlugin () const |
std::string | pluginInfo () const |
int | testApplicationDirectoryCount () const |
std::string | testApplicationDirectory (int index) const |
int | explorerPluginParameterCount () const |
std::string | explorerPluginParameter (int index) const |
bool | numberOfConfigurations () const |
bool | printSummary () const |
std::string | summaryOrdering () const |
bool | writeOutConfiguration () const |
bool | writeOutBestConfiguration () const |
int | numberOfConfigurationsToWrite () const |
RowID | configurationToWrite (int index) const |
bool | printApplications () const |
bool | printPlugins () const |
int | applicationIDToRemoveCount () const |
RowID | applicationIDToRemove (int index) const |
bool | hdbFileNames () const |
int | hdbFileNameCount () const |
std::string | hdbFileName (int index) const |
RowID | startConfiguration () const |
bool | adfFile () const |
bool | adfOutFile () const |
bool | idfFile () const |
std::string | adfFileName () const |
std::string | adfOutFileName () const |
std::string | idfFileName () const |
std::string | paretoSetValues () const |
bool | compilerOptions () const |
std::string | compilerOptionsString () const |
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 | |
ExplorerCmdLineOptions (const ExplorerCmdLineOptions &) | |
Copying not allowed. More... | |
ExplorerCmdLineOptions & | operator= (const ExplorerCmdLineOptions &) |
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 Explorer.
Definition at line 45 of file ExplorerCmdLineOptions.hh.
ExplorerCmdLineOptions::ExplorerCmdLineOptions | ( | ) |
Constructor.
Definition at line 117 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::addOption(), SWL_ADF_FILE, SWL_ADF_OUT_FILE, SWL_COMPILER_OPTIONS, SWL_CONFIGURATION_COUNT, SWL_CONFIGURATION_SUMMARY, SWL_CONFIGURATION_WRITE, SWL_DUMP_BEST, SWL_HDB_FILE, SWL_IDF_FILE, SWL_LIST_APPS, SWL_LIST_PLUGINS, SWL_PARETO_SET, SWL_PLUGIN_INFO, SWL_PLUGIN_NAME, SWL_PLUGIN_PARAM, SWL_START_ID, SWL_TEST_DIR_ADD, SWL_TEST_DIR_RM, SWS_ADF_FILE, SWS_COMPILER_OPTIONS, SWS_CONFIGURATION_COUNT, SWS_CONFIGURATION_SUMMARY, SWS_CONFIGURATION_WRITE, SWS_HDB_FILE, SWS_IDF_FILE, SWS_LIST_APPS, SWS_LIST_PLUGINS, SWS_PARETO_SET, SWS_PLUGIN_INFO, SWS_PLUGIN_NAME, SWS_PLUGIN_PARAM, SWS_START_ID, SWS_TEST_DIR_ADD, and SWS_TEST_DIR_RM.
|
virtual |
|
private |
Copying not allowed.
bool ExplorerCmdLineOptions::adfFile | ( | ) | const |
Returns true if an adf file is given as an option.
Definition at line 538 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_ADF_FILE.
Referenced by adfFileName().
std::string ExplorerCmdLineOptions::adfFileName | ( | ) | const |
Returns the name of the adf file given as an option.
Returns an empty string if no adf file was given.
Definition at line 565 of file ExplorerCmdLineOptions.cc.
References adfFile(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_ADF_FILE.
bool ExplorerCmdLineOptions::adfOutFile | ( | ) | const |
Definition at line 543 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_ADF_OUT_FILE.
Referenced by adfOutFileName().
std::string ExplorerCmdLineOptions::adfOutFileName | ( | ) | const |
Definition at line 574 of file ExplorerCmdLineOptions.cc.
References adfOutFile(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_ADF_OUT_FILE.
RowID ExplorerCmdLineOptions::applicationIDToRemove | ( | int | index | ) | const |
By the given index, returns the application id given as an option to remove from DSDB.
index | The index. |
OutOfRange | If the given index is negative or greater than the number of expendable applications. |
Definition at line 469 of file ExplorerCmdLineOptions.cc.
References __func__, applicationIDToRemoveCount(), CmdLineParser::findOption(), CmdLineOptionParser::integer(), and SWL_TEST_DIR_RM.
int ExplorerCmdLineOptions::applicationIDToRemoveCount | ( | ) | const |
Returns the number of test applications to be removed from the DSDB.
Definition at line 455 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_TEST_DIR_RM.
Referenced by applicationIDToRemove().
bool ExplorerCmdLineOptions::compilerOptions | ( | ) | const |
Returns true if a compiler options are given as an option.
Definition at line 604 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_COMPILER_OPTIONS.
Referenced by compilerOptionsString().
std::string ExplorerCmdLineOptions::compilerOptionsString | ( | ) | const |
Returns the string of compiler options given as an option.
Returns an empty string if no compiler options were given.
Definition at line 616 of file ExplorerCmdLineOptions.cc.
References compilerOptions(), CmdLineParser::findOption(), CmdLineOptionParser::listSize(), CmdLineOptionParser::String(), and SWL_COMPILER_OPTIONS.
RowID ExplorerCmdLineOptions::configurationToWrite | ( | int | index | ) | const |
By the given index, returns the configuration id given as an option.
index | The index. |
OutOfRange | If the given index is negative or greater than the number configurations. |
Definition at line 421 of file ExplorerCmdLineOptions.cc.
References __func__, CmdLineParser::findOption(), CmdLineOptionParser::integer(), numberOfConfigurationsToWrite(), and SWL_CONFIGURATION_WRITE.
std::string ExplorerCmdLineOptions::explorerPlugin | ( | ) | const |
Returns the explorer plugin name.
Definition at line 274 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_NAME.
std::string ExplorerCmdLineOptions::explorerPluginParameter | ( | int | index | ) | const |
By the given index, returns a parameter given to the explorer plugin.
index | The index. |
OutOfRange | If the given index is negative or greater than the number of parameters given to the explorer plugin. |
Definition at line 335 of file ExplorerCmdLineOptions.cc.
References __func__, explorerPluginParameterCount(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_PARAM.
int ExplorerCmdLineOptions::explorerPluginParameterCount | ( | ) | const |
Returns the number of parameters given to the explorer plugin.
Definition at line 322 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_PLUGIN_PARAM.
Referenced by explorerPluginParameter().
std::string ExplorerCmdLineOptions::hdbFileName | ( | int | index | ) | const |
By the given index, returns the HDB file given as an option.
index | The index. |
OutOfRange | If the given index is negative or greater than the number given HDB files. |
Definition at line 506 of file ExplorerCmdLineOptions.cc.
References __func__, CmdLineParser::findOption(), hdbFileNameCount(), CmdLineOptionParser::String(), and SWL_HDB_FILE.
int ExplorerCmdLineOptions::hdbFileNameCount | ( | ) | const |
Returns the number of the HDB file options given.
Definition at line 493 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_HDB_FILE.
Referenced by hdbFileName().
bool ExplorerCmdLineOptions::hdbFileNames | ( | ) | const |
Returns true if at least one HDB file is given as an option.
Definition at line 483 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_HDB_FILE.
bool ExplorerCmdLineOptions::idfFile | ( | ) | const |
Returns true if an idf file is given as an option.
Definition at line 553 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_IDF_FILE.
Referenced by idfFileName().
std::string ExplorerCmdLineOptions::idfFileName | ( | ) | const |
Returns the name of the idf file given as an option.
Returns an empty string if no adf file was given.
Definition at line 590 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), idfFile(), CmdLineOptionParser::String(), and SWL_IDF_FILE.
bool ExplorerCmdLineOptions::numberOfConfigurations | ( | ) | const |
Returns true if the number of configurations options is set.
Definition at line 349 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_CONFIGURATION_COUNT.
int ExplorerCmdLineOptions::numberOfConfigurationsToWrite | ( | ) | const |
Returns the number of the write out configuration options given.
Definition at line 408 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_CONFIGURATION_WRITE.
Referenced by configurationToWrite().
|
private |
Assignment not allowed.
std::string ExplorerCmdLineOptions::paretoSetValues | ( | ) | const |
Returns the valuing type of the pareto set printing.
Definition at line 379 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PARETO_SET.
std::string ExplorerCmdLineOptions::pluginInfo | ( | ) | const |
Returns the the plugin name which info is to be printed.
Definition at line 284 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_INFO.
bool ExplorerCmdLineOptions::printApplications | ( | ) | const |
Returns true if print applications option is used.
Definition at line 435 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_LIST_APPS.
|
virtual |
Prints the help menu of the program.
Reimplemented from CmdLineOptions.
Definition at line 242 of file ExplorerCmdLineOptions.cc.
References CmdLineOptions::printHelp(), and printVersion().
bool ExplorerCmdLineOptions::printPlugins | ( | ) | const |
Returns true if print applications option is used.
Definition at line 445 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_LIST_PLUGINS.
bool ExplorerCmdLineOptions::printSummary | ( | ) | const |
Returns true if the number of configurations options is set.
Definition at line 359 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_CONFIGURATION_SUMMARY.
|
virtual |
Prints the version of the program.
Implements CmdLineOptions.
Definition at line 231 of file ExplorerCmdLineOptions.cc.
References DSCLI_TITLE, and Application::TCEVersionString().
Referenced by printHelp().
RowID ExplorerCmdLineOptions::startConfiguration | ( | ) | const |
Returns the ID of the start configuration given as option.
If start configuration option was not given returns zero.
Definition at line 523 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::integer(), and SWL_START_ID.
std::string ExplorerCmdLineOptions::summaryOrdering | ( | ) | const |
Returns true if the number of configurations options is set.
Definition at line 369 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_CONFIGURATION_SUMMARY.
std::string ExplorerCmdLineOptions::testApplicationDirectory | ( | int | index | ) | const |
By the given index, returns a test application directory name given as command line parameter.
index | The index. |
OutOfRange | If the given index is negative or greater than the number of test directories given as parameter. |
Definition at line 308 of file ExplorerCmdLineOptions.cc.
References __func__, CmdLineParser::findOption(), CmdLineOptionParser::String(), SWL_TEST_DIR_ADD, and testApplicationDirectoryCount().
int ExplorerCmdLineOptions::testApplicationDirectoryCount | ( | ) | const |
Returns the number of directories where test applications are located.
Definition at line 294 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_TEST_DIR_ADD.
Referenced by testApplicationDirectory().
bool ExplorerCmdLineOptions::writeOutBestConfiguration | ( | ) | const |
Definition at line 398 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_DUMP_BEST.
bool ExplorerCmdLineOptions::writeOutConfiguration | ( | ) | const |
Returns true if writing out configuration(s) option is used.
Definition at line 393 of file ExplorerCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_CONFIGURATION_WRITE.