OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
ExplorerCmdLineOptions Class Reference

#include <ExplorerCmdLineOptions.hh>

Inheritance diagram for ExplorerCmdLineOptions:
Inheritance graph
Collaboration diagram for ExplorerCmdLineOptions:
Collaboration graph

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.
 
ExplorerCmdLineOptionsoperator= (const ExplorerCmdLineOptions &)
 Assignment not allowed.
 

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)
 
CmdLineOptionParserfindOption (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.
 
std::map< std::string, CmdLineOptionParser * > optionShortNames_
 Database for holding options with their short names as a key.
 
std::vector< std::string > commandLine_
 Command line is stored here.
 
std::vector< std::string > arguments_
 Command line arguments are stored here.
 
std::vector< std::string > prefixes_
 Legal prefixes are stored here.
 

Detailed Description

Command line option class for Explorer.

Definition at line 45 of file ExplorerCmdLineOptions.hh.

Constructor & Destructor Documentation

◆ ExplorerCmdLineOptions() [1/2]

ExplorerCmdLineOptions::ExplorerCmdLineOptions ( )

Constructor.

Todo:
Use textgenerator in the help texts.

Definition at line 117 of file ExplorerCmdLineOptions.cc.

117 : CmdLineOptions("") {
118 addOption(
121 "Design Space Explorer plugin to be used.",
123 addOption(
126 "Design Space Explorer plugin to print info about.",
128 addOption(
131 "Parameter to the explorer plugin in form 'name=value'.",
133 addOption(
136 "Path(s) of the test application(s) to be added into the DSDB.",
138 addOption(
141 "ID(s) of the test program path(s) to be removed from the DSDB.",
143 addOption(
146 "Starting point configuration ID in the DSDB.",
147 SWS_START_ID));
148 addOption(
151 "Print the summary of machine configurations in the DSDB"
152 "ordered by:\n"
153 " Ordering may be one of the following:\n"
154 " I ordering by configuration Id,\n"
155 " P ordering by application path,\n"
156 " C ordering by cycle count,\n"
157 " E ordering by energy estimate.",
159 addOption(
162 "Print the pareto sets of machine configurations in the DSDB "
163 "with certain value sets:\n"
164 " Value set may be one of the following:\n"
165 " C cycle counts and number of connections.",
167 addOption(
170 "Print the number of machine configurations in the DSDB.",
172 addOption(
175 "Write out the ADF and IDF files from the DSDB with given "
176 "configuration id.",
178 addOption(
181 "List the applications in the DSDB.",
183 addOption(
186 "List loadable plugins.",
188 addOption(
191 "HDB to use with exploration. If not given 'asic_130nm_1.5V.hdb' "
192 "will be used.",
193 SWS_HDB_FILE));
194 addOption(
197 "ADF to add into the DSDB.",
198 SWS_ADF_FILE));
199 addOption(
202 "IDF to add into the DSDB, needs also ADF.",
203 SWS_IDF_FILE));
204 addOption(
207 "Options to pass to the compiler.",
209 addOption(
212 "Set the ADF output filename (use in combination with -w "
213 "or --dump_best).", ""));
214 addOption(
217 "Dump the best configuration produced by the executed exploration "
218 "algorithm.", ""));
219}
const std::string SWL_PLUGIN_INFO
Long switch string for giving an explorer plugin info.
const std::string SWS_CONFIGURATION_WRITE
Short switch string for writing out configuration files.
const std::string SWS_ADF_FILE
Short switch string for adf file.
const std::string SWS_HDB_FILE
Short switch string for hdb file.
const std::string SWL_TEST_DIR_ADD
Long switch string for adding a application directory.
const std::string SWL_ADF_OUT_FILE
const std::string SWS_PLUGIN_NAME
Short switch string for giving an explorer plugin to be used.
const std::string SWL_PLUGIN_PARAM
Long switch string for giving an explorer plugin to be used.
const std::string SWL_LIST_PLUGINS
Long switch string for listing loadable plugins.
const std::string SWL_IDF_FILE
Long switch string for idf file.
const std::string SWS_TEST_DIR_ADD
Short switch string for adding a application directory.
const std::string SWS_CONFIGURATION_COUNT
Short switch string for number of configurations flag.
const std::string SWL_CONFIGURATION_COUNT
Long switch string for number of configurations flag.
const std::string SWL_CONFIGURATION_WRITE
Long switch string for writing out configuration files.
const std::string SWS_LIST_APPS
Short switch string for listing loadable plugins.
const std::string SWS_CONFIGURATION_SUMMARY
Short switch string for number of configurations flag.
const std::string SWS_PARETO_SET
const std::string SWS_LIST_PLUGINS
Short switch string for listing application paths in the dsdb.
const std::string SWL_DUMP_BEST
const std::string SWL_ADF_FILE
Long switch string for adf file.
const std::string SWL_PLUGIN_NAME
Long switch string for giving an explorer plugin to be used.
const std::string SWL_PARETO_SET
Switch strings for the pareto set flag.
const std::string SWS_COMPILER_OPTIONS
Short switch string of options to pass to compiler.
const std::string SWL_COMPILER_OPTIONS
Long switch string of options to pass to compiler.
const std::string SWS_IDF_FILE
Short switch string for idf file.
const std::string SWS_PLUGIN_PARAM
Short switch string for giving an explorer plugin to be used.
const std::string SWL_HDB_FILE
Long switch string for hdb file.
const std::string SWL_START_ID
Long switch string for giving a start configuration id.
const std::string SWL_TEST_DIR_RM
Long switch string for removing application paths from dsdb.
const std::string SWS_START_ID
Short switch string for giving a start configuration id.
const std::string SWL_CONFIGURATION_SUMMARY
Long switch string for number of configurations flag.
const std::string SWL_LIST_APPS
Long switch string for listing application paths in the dsdb.
const std::string SWS_TEST_DIR_RM
Short switch string for removing application paths from dsdb.
const std::string SWS_PLUGIN_INFO
Short switch string for giving an explorer plugin info.
void addOption(CmdLineOptionParser *opt)

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.

Here is the call graph for this function:

◆ ~ExplorerCmdLineOptions()

ExplorerCmdLineOptions::~ExplorerCmdLineOptions ( )
virtual

Destructor.

Definition at line 224 of file ExplorerCmdLineOptions.cc.

224 {
225}

◆ ExplorerCmdLineOptions() [2/2]

ExplorerCmdLineOptions::ExplorerCmdLineOptions ( const ExplorerCmdLineOptions )
private

Copying not allowed.

Member Function Documentation

◆ adfFile()

bool ExplorerCmdLineOptions::adfFile ( ) const

Returns true if an adf file is given as an option.

Returns
True if an adf file is given as an option.

Definition at line 538 of file ExplorerCmdLineOptions.cc.

538 {
540}
CmdLineOptionParser * findOption(std::string name) const

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_ADF_FILE.

Referenced by adfFileName().

Here is the call graph for this function:

◆ 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.

Returns
ADF file name.

Definition at line 565 of file ExplorerCmdLineOptions.cc.

565 {
566 if (adfFile()) {
567 return findOption(SWL_ADF_FILE)->String(1);
568 } else {
569 return "";
570 }
571}
virtual std::string String(int index=0) const

References adfFile(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_ADF_FILE.

Here is the call graph for this function:

◆ adfOutFile()

bool ExplorerCmdLineOptions::adfOutFile ( ) const

Definition at line 543 of file ExplorerCmdLineOptions.cc.

543 {
545}

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_ADF_OUT_FILE.

Referenced by adfOutFileName().

Here is the call graph for this function:

◆ adfOutFileName()

std::string ExplorerCmdLineOptions::adfOutFileName ( ) const

Definition at line 574 of file ExplorerCmdLineOptions.cc.

574 {
575 if (adfOutFile()) {
577 } else {
578 return "";
579 }
580}

References adfOutFile(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_ADF_OUT_FILE.

Here is the call graph for this function:

◆ applicationIDToRemove()

RowID ExplorerCmdLineOptions::applicationIDToRemove ( int  index) const

By the given index, returns the application id given as an option to remove from DSDB.

Parameters
indexThe index.
Returns
Application id in the given index.
Exceptions
OutOfRangeIf the given index is negative or greater than the number of expendable applications.

Definition at line 469 of file ExplorerCmdLineOptions.cc.

469 {
470 if (index < 0 || index >= applicationIDToRemoveCount()) {
471 throw OutOfRange(__FILE__, __LINE__, __func__);
472 }
473
474 return findOption(SWL_TEST_DIR_RM)->integer(index + 1);
475}
#define __func__
virtual int integer(int index=0) const

References __func__, applicationIDToRemoveCount(), CmdLineParser::findOption(), CmdLineOptionParser::integer(), and SWL_TEST_DIR_RM.

Here is the call graph for this function:

◆ applicationIDToRemoveCount()

int ExplorerCmdLineOptions::applicationIDToRemoveCount ( ) const

Returns the number of test applications to be removed from the DSDB.

Returns
The number of expendable applications.

Definition at line 455 of file ExplorerCmdLineOptions.cc.

455 {
457}
virtual int listSize() const

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_TEST_DIR_RM.

Referenced by applicationIDToRemove().

Here is the call graph for this function:

◆ compilerOptions()

bool ExplorerCmdLineOptions::compilerOptions ( ) const

Returns true if a compiler options are given as an option.

Returns
True if a compiler options are given as an option.

Definition at line 604 of file ExplorerCmdLineOptions.cc.

604 {
606}

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_COMPILER_OPTIONS.

Referenced by compilerOptionsString().

Here is the call graph for this function:

◆ 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.

Returns
compiler options as a string.

Definition at line 616 of file ExplorerCmdLineOptions.cc.

616 {
617
618 if (!compilerOptions()) return "";
619
620 TCEString optsString;
621 for (int i = 0; i < findOption(SWL_COMPILER_OPTIONS)->listSize(); ++i) {
622 optsString << findOption(SWL_COMPILER_OPTIONS)->String(i + 1) << " ";
623 }
624 return optsString;
625}

References compilerOptions(), CmdLineParser::findOption(), CmdLineOptionParser::listSize(), CmdLineOptionParser::String(), and SWL_COMPILER_OPTIONS.

Here is the call graph for this function:

◆ configurationToWrite()

RowID ExplorerCmdLineOptions::configurationToWrite ( int  index) const

By the given index, returns the configuration id given as an option.

Parameters
indexThe index.
Returns
Configuration id in the given index.
Exceptions
OutOfRangeIf the given index is negative or greater than the number configurations.

Definition at line 421 of file ExplorerCmdLineOptions.cc.

421 {
422 if (index < 0 || index >= numberOfConfigurationsToWrite()) {
423 throw OutOfRange(__FILE__, __LINE__, __func__);
424 }
425
426 return findOption(SWL_CONFIGURATION_WRITE)->integer(index + 1);
427}

References __func__, CmdLineParser::findOption(), CmdLineOptionParser::integer(), numberOfConfigurationsToWrite(), and SWL_CONFIGURATION_WRITE.

Here is the call graph for this function:

◆ explorerPlugin()

std::string ExplorerCmdLineOptions::explorerPlugin ( ) const

Returns the explorer plugin name.

Returns
The explorer plugin name.

Definition at line 274 of file ExplorerCmdLineOptions.cc.

274 {
276}

References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_NAME.

Here is the call graph for this function:

◆ explorerPluginParameter()

std::string ExplorerCmdLineOptions::explorerPluginParameter ( int  index) const

By the given index, returns a parameter given to the explorer plugin.

Parameters
indexThe index.
Returns
Parameter in the given index.
Exceptions
OutOfRangeIf 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.

335 {
336 if (index < 0 || index >= explorerPluginParameterCount()) {
337 throw OutOfRange(__FILE__, __LINE__, __func__);
338 }
339
340 return findOption(SWL_PLUGIN_PARAM)->String(index + 1);
341}

References __func__, explorerPluginParameterCount(), CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_PARAM.

Here is the call graph for this function:

◆ explorerPluginParameterCount()

int ExplorerCmdLineOptions::explorerPluginParameterCount ( ) const

Returns the number of parameters given to the explorer plugin.

Returns
The number of parameters.

Definition at line 322 of file ExplorerCmdLineOptions.cc.

322 {
324}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_PLUGIN_PARAM.

Referenced by explorerPluginParameter().

Here is the call graph for this function:

◆ hdbFileName()

std::string ExplorerCmdLineOptions::hdbFileName ( int  index) const

By the given index, returns the HDB file given as an option.

Parameters
indexThe index.
Returns
HDB file string from the given index.
Exceptions
OutOfRangeIf the given index is negative or greater than the number given HDB files.

Definition at line 506 of file ExplorerCmdLineOptions.cc.

506 {
507 if (index < 0 || index >= hdbFileNameCount()) {
508 throw OutOfRange(__FILE__, __LINE__, __func__);
509 }
510
511 return findOption(SWL_HDB_FILE)->String(index + 1);
512}

References __func__, CmdLineParser::findOption(), hdbFileNameCount(), CmdLineOptionParser::String(), and SWL_HDB_FILE.

Here is the call graph for this function:

◆ hdbFileNameCount()

int ExplorerCmdLineOptions::hdbFileNameCount ( ) const

Returns the number of the HDB file options given.

Returns
Number of given HDB file options.

Definition at line 493 of file ExplorerCmdLineOptions.cc.

493 {
495}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_HDB_FILE.

Referenced by hdbFileName().

Here is the call graph for this function:

◆ hdbFileNames()

bool ExplorerCmdLineOptions::hdbFileNames ( ) const

Returns true if at least one HDB file is given as an option.

Returns
True if the option is defined.

Definition at line 483 of file ExplorerCmdLineOptions.cc.

483 {
485}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_HDB_FILE.

Here is the call graph for this function:

◆ idfFile()

bool ExplorerCmdLineOptions::idfFile ( ) const

Returns true if an idf file is given as an option.

Returns
True if an idf file is given as an option.

Definition at line 553 of file ExplorerCmdLineOptions.cc.

553 {
555}

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_IDF_FILE.

Referenced by idfFileName().

Here is the call graph for this function:

◆ 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.

Returns
IDF file name.

Definition at line 590 of file ExplorerCmdLineOptions.cc.

590 {
591 if (idfFile()) {
592 return findOption(SWL_IDF_FILE)->String(1);
593 } else {
594 return "";
595 }
596}

References CmdLineParser::findOption(), idfFile(), CmdLineOptionParser::String(), and SWL_IDF_FILE.

Here is the call graph for this function:

◆ numberOfConfigurations()

bool ExplorerCmdLineOptions::numberOfConfigurations ( ) const

Returns true if the number of configurations options is set.

Returns
True if the option is set.

Definition at line 349 of file ExplorerCmdLineOptions.cc.

349 {
351}
virtual bool isFlagOn() const

References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_CONFIGURATION_COUNT.

Here is the call graph for this function:

◆ numberOfConfigurationsToWrite()

int ExplorerCmdLineOptions::numberOfConfigurationsToWrite ( ) const

Returns the number of the write out configuration options given.

Returns
Number of given write out options.

Definition at line 408 of file ExplorerCmdLineOptions.cc.

408 {
410}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_CONFIGURATION_WRITE.

Referenced by configurationToWrite().

Here is the call graph for this function:

◆ operator=()

ExplorerCmdLineOptions & ExplorerCmdLineOptions::operator= ( const ExplorerCmdLineOptions )
private

Assignment not allowed.

◆ paretoSetValues()

std::string ExplorerCmdLineOptions::paretoSetValues ( ) const

Returns the valuing type of the pareto set printing.

Returns
Empty if pareto set not wanted.

Definition at line 379 of file ExplorerCmdLineOptions.cc.

379 {
380 if (!findOption(SWL_PARETO_SET)->isDefined()) {
381 return "";
382 }
384}

References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PARETO_SET.

Here is the call graph for this function:

◆ pluginInfo()

std::string ExplorerCmdLineOptions::pluginInfo ( ) const

Returns the the plugin name which info is to be printed.

Returns
The explorer plugin name which info is to be printed.

Definition at line 284 of file ExplorerCmdLineOptions.cc.

284 {
286}

References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_PLUGIN_INFO.

Here is the call graph for this function:

◆ printApplications()

bool ExplorerCmdLineOptions::printApplications ( ) const

Returns true if print applications option is used.

Returns
True if the option is defined.

Definition at line 435 of file ExplorerCmdLineOptions.cc.

435 {
437}

References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_LIST_APPS.

Here is the call graph for this function:

◆ printHelp()

void ExplorerCmdLineOptions::printHelp ( ) const
virtual

Prints the help menu of the program.

Todo:
Implement using ExplorerTextGenerator.

Reimplemented from CmdLineOptions.

Definition at line 242 of file ExplorerCmdLineOptions.cc.

242 {
243 printVersion();
244 std::cout << std::endl
245 << "Usage: explore [options] [dsdb_file]"
246 << std::endl
247 << "Example: -e InitialMachineExplorer "
248 << "-d data/newApplication "
249 << "-u bus_count=5 -u build_idf=true test.dsdb"
250 << std::endl
251 << std::endl
252 << "DSDB file is required always and new is created if not found."
253 << std::endl
254 << "Plugin name, DSDB and at least one application directory "
255 << std::endl
256 << "in the DSDB are required to run exploration, start "
257 << std::endl
258 << "configuration ID is optional."
259 << std::endl
260 << "Any number of parameters that are passed to the used plugin "
261 << "can be given."
262 << std::endl
263 << "Queries can be carried out to the DSDB."
264 << std::endl;
266}
virtual void printHelp() const
virtual void printVersion() const

References CmdLineOptions::printHelp(), and printVersion().

Here is the call graph for this function:

◆ printPlugins()

bool ExplorerCmdLineOptions::printPlugins ( ) const

Returns true if print applications option is used.

Returns
True if the option is defined.

Definition at line 445 of file ExplorerCmdLineOptions.cc.

445 {
447}

References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SWL_LIST_PLUGINS.

Here is the call graph for this function:

◆ printSummary()

bool ExplorerCmdLineOptions::printSummary ( ) const

Returns true if the number of configurations options is set.

Returns
True if the option is set.

Definition at line 359 of file ExplorerCmdLineOptions.cc.

359 {
361}

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_CONFIGURATION_SUMMARY.

Here is the call graph for this function:

◆ printVersion()

void ExplorerCmdLineOptions::printVersion ( ) const
virtual

Prints the version of the program.

Implements CmdLineOptions.

Definition at line 231 of file ExplorerCmdLineOptions.cc.

231 {
232 std::cout << DSCLI_TITLE << " version "
233 << Application::TCEVersionString() << std::endl;
234}
const std::string DSCLI_TITLE
Design space explorer title.
static std::string TCEVersionString()

References DSCLI_TITLE, and Application::TCEVersionString().

Referenced by printHelp().

Here is the call graph for this function:

◆ startConfiguration()

RowID ExplorerCmdLineOptions::startConfiguration ( ) const

Returns the ID of the start configuration given as option.

If start configuration option was not given returns zero.

Returns
The ID of given start configuration or zero if the option was not used.

Definition at line 523 of file ExplorerCmdLineOptions.cc.

523 {
524
525 if (findOption(SWL_START_ID)->isDefined()) {
527 } else {
528 return 0;
529 }
530}

References CmdLineParser::findOption(), CmdLineOptionParser::integer(), and SWL_START_ID.

Here is the call graph for this function:

◆ summaryOrdering()

std::string ExplorerCmdLineOptions::summaryOrdering ( ) const

Returns true if the number of configurations options is set.

Returns
True if the option is set.

Definition at line 369 of file ExplorerCmdLineOptions.cc.

369 {
371}

References CmdLineParser::findOption(), CmdLineOptionParser::String(), and SWL_CONFIGURATION_SUMMARY.

Here is the call graph for this function:

◆ testApplicationDirectory()

std::string ExplorerCmdLineOptions::testApplicationDirectory ( int  index) const

By the given index, returns a test application directory name given as command line parameter.

Parameters
indexThe index.
Returns
Test application directory path in the given index.
Exceptions
OutOfRangeIf the given index is negative or greater than the number of test directories given as parameter.

Definition at line 308 of file ExplorerCmdLineOptions.cc.

308 {
309 if (index < 0 || index >= testApplicationDirectoryCount()) {
310 throw OutOfRange(__FILE__, __LINE__, __func__);
311 }
312
313 return findOption(SWL_TEST_DIR_ADD)->String(index + 1);
314}

References __func__, CmdLineParser::findOption(), CmdLineOptionParser::String(), SWL_TEST_DIR_ADD, and testApplicationDirectoryCount().

Here is the call graph for this function:

◆ testApplicationDirectoryCount()

int ExplorerCmdLineOptions::testApplicationDirectoryCount ( ) const

Returns the number of directories where test applications are located.

Returns
The number of test directories.

Definition at line 294 of file ExplorerCmdLineOptions.cc.

294 {
296}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_TEST_DIR_ADD.

Referenced by testApplicationDirectory().

Here is the call graph for this function:

◆ writeOutBestConfiguration()

bool ExplorerCmdLineOptions::writeOutBestConfiguration ( ) const

Definition at line 398 of file ExplorerCmdLineOptions.cc.

398 {
400}

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and SWL_DUMP_BEST.

Here is the call graph for this function:

◆ writeOutConfiguration()

bool ExplorerCmdLineOptions::writeOutConfiguration ( ) const

Returns true if writing out configuration(s) option is used.

Returns
True if the option is defined.

Definition at line 393 of file ExplorerCmdLineOptions.cc.

393 {
395}

References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and SWL_CONFIGURATION_WRITE.

Here is the call graph for this function:

The documentation for this class was generated from the following files: