| OpenASIP 2.2
    | 
#include <CmdLineOptionParser.hh>


| Public Member Functions | |
| CmdLineOptionParser (std::string name, std::string desc, std::string alias, bool hidden=false) | |
| virtual | ~CmdLineOptionParser () | 
| virtual OptionValue * | copy () const =0 | 
| std::string | longName () const | 
| std::string | shortName () const | 
| std::string | description () const | 
| virtual bool | parseValue (std::string arguments, std::string prefix)=0 | 
| Pure virtual function that parses the value of option. | |
| bool | isHidden () | 
| bool | isDefined () | 
| virtual int | integer (int index=0) const | 
| virtual unsigned | unsignedInteger (int index=0) const | 
| virtual std::string | String (int index=0) const | 
| virtual double | real () const | 
| virtual bool | isFlagOn () const | 
| virtual bool | isFlagOff () const | 
| virtual int | listSize () const | 
| Protected Member Functions | |
| void | setDefined () | 
| Private Member Functions | |
| CmdLineOptionParser (const CmdLineOptionParser &) | |
| Copying not allowed. | |
| CmdLineOptionParser & | operator= (const CmdLineOptionParser &) | 
| Assignment not allowed. | |
| Private Attributes | |
| std::string | longName_ | 
| The full name of an option. | |
| std::string | shortName_ | 
| The optional alias (shorter name). | |
| std::string | desc_ | 
| The description of option. | |
| bool | hidden_ = false | 
| The hidden flag. If set, no entry is printed in the normal help text. | |
| bool | defined_ | 
| Is the value of this option set in the parsed command line? | |
Abstract base class for modeling command line options and their built-in mini-parser.
All option types have a set of properties that identify the option: name, description and short name (alias). Possible concrete types of options are: Boolean, real, integer, and character string.
Definition at line 56 of file CmdLineOptionParser.hh.
| CmdLineOptionParser::CmdLineOptionParser | ( | std::string | name, | 
| std::string | desc, | ||
| std::string | alias, | ||
| bool | hidden = false | ||
| ) | 
Constructor.
| name | The name of the option. | 
| desc | The description of the option. | 
| alias | The short name of the option. | 
Definition at line 62 of file CmdLineOptionParser.cc.
| 
 | virtual | 
| 
 | private | 
Copying not allowed.
| 
 | pure virtual | 
Implemented in IntegerCmdLineOptionParser, UnsignedIntegerCmdLineOptionParser, StringCmdLineOptionParser, OptionalStringCmdLineOptionParser, RealCmdLineOptionParser, BoolCmdLineOptionParser, IntegerListCmdLineOptionParser, and StringListCmdLineOptionParser.
Referenced by CmdLineParser::storeOptions().
| std::string CmdLineOptionParser::description | ( | ) | const | 
Referenced by CmdLineOptions::printHelp().
| 
 | virtual | 
This implementation should never be called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in IntegerCmdLineOptionParser, and IntegerListCmdLineOptionParser.
Definition at line 84 of file CmdLineOptionParser.cc.
References __func__.
Referenced by ExplorerCmdLineOptions::applicationIDToRemove(), SchedulerCmdLineOptions::bypassDistance(), ProGeCmdLineOptions::clockFrequency(), ExplorerCmdLineOptions::configurationToWrite(), PIGCmdLineOptions::dataMemoryWidthInMAUs(), TestHDBCmdLineOptions::fuEntryID(), SchedulerCmdLineOptions::ifConversionThreshold(), SchedulerCmdLineOptions::lowMemModeThreshold(), SchedulerCmdLineOptions::noDreBypassDistance(), SchedulerCmdLineOptions::operandShareDistance(), LLVMTCECmdLineOptions::optLevel(), TestHDBCmdLineOptions::rfEntryID(), SchedulerCmdLineOptions::schedulingWindowSize(), ProGeCmdLineOptions::simulationRuntime(), and ExplorerCmdLineOptions::startConfiguration().
| bool CmdLineOptionParser::isDefined | ( | ) | 
Returns true if the option was defined in the command line.
Definition at line 169 of file CmdLineOptionParser.cc.
References defined_.
Referenced by ExplorerCmdLineOptions::adfFile(), ExplorerCmdLineOptions::adfOutFile(), LLVMTCECmdLineOptions::analyzeInstructionPatterns(), LLVMTCECmdLineOptions::assumeADFStackAlignment(), ExplorerCmdLineOptions::compilerOptions(), PIGCmdLineOptions::dataMemoryWidthInMAUs(), ProgramImageGenerator::dataStartAddress(), LLVMTCECmdLineOptions::dataStartAddress(), LLVMTCECmdLineOptions::disableAddressSpaceAA(), LLVMTCECmdLineOptions::disableDelaySlotFiller(), LLVMTCECmdLineOptions::disableHWLoops(), LLVMTCECmdLineOptions::disableLLVMAA(), LLVMTCECmdLineOptions::dumpDDGsDot(), LLVMTCECmdLineOptions::dumpDDGsXML(), ExplorerCmdLineOptions::idfFile(), LLVMTCECmdLineOptions::isDataStartAddressSet(), ProgramImageGenerator::isDataStartSet(), TestHDBCmdLineOptions::isFUEntryIDGiven(), LLVMTCECmdLineOptions::isInitialStackPointerValueSet(), SchedulerCmdLineOptions::isLoopOptDefined(), SchedulerCmdLineOptions::isMachineFileDefined(), LLVMTCECmdLineOptions::isOptLevelDefined(), SchedulerCmdLineOptions::isOutputFileDefined(), TestHDBCmdLineOptions::isRFEntryIDGiven(), LLVMTCECmdLineOptions::isStandardEmulationLibDefined(), CmdLineOptions::isVerboseSpamSwitchDefined(), LLVMTCECmdLineOptions::isVerboseSwitchDefined(), CmdLineOptions::isVerboseSwitchDefined(), LLVMTCECmdLineOptions::isWorkItemAAFileDefined(), CmdLineOptions::optionGiven(), DisasmCmdLineOptions::outputFileDefined(), ExplorerCmdLineOptions::printSummary(), LLVMTCECmdLineOptions::saveBackendPlugin(), SchedulerCmdLineOptions::schedulingWindowSize(), LLVMTCECmdLineOptions::useBubbleFish2Scheduler(), LLVMTCECmdLineOptions::useBUScheduler(), LLVMTCECmdLineOptions::useOldBackendSources(), SchedulerCmdLineOptions::useRestrictedAliasAnalyzer(), LLVMTCECmdLineOptions::useTDScheduler(), LLVMTCECmdLineOptions::useVectorBackend(), and ExplorerCmdLineOptions::writeOutBestConfiguration().
| 
 | virtual | 
This implementation should never be called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in OptionalStringCmdLineOptionParser, and BoolCmdLineOptionParser.
Definition at line 138 of file CmdLineOptionParser.cc.
References __func__.
Referenced by AsmCmdLineOptions::printWarnings().
| 
 | virtual | 
This implementation should never be called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in OptionalStringCmdLineOptionParser, and BoolCmdLineOptionParser.
Definition at line 126 of file CmdLineOptionParser.cc.
References __func__.
Referenced by ProGeCmdLineOptions::asyncReset(), SimulatorCmdLineOptions::backendType(), SimulatorCmdLineOptions::debugMode(), DictionaryToolCmdLineOptions::doNotPrintErrors(), SchedulerCmdLineOptions::dumpIfConversionCFGs(), SchedulerCmdLineOptions::enableOffsetAA(), SchedulerCmdLineOptions::enableStackAA(), DisasmCmdLineOptions::flatFile(), ProGeCmdLineOptions::forceOutputDirectory(), PIGCmdLineOptions::generateDataImages(), PIGCmdLineOptions::generateDecompressor(), ProGeCmdLineOptions::generateTestbench(), BuildOpsetOptions::ignore(), SchedulerCmdLineOptions::killDeadResults(), TestHDBCmdLineOptions::leaveDirty(), TTAUnitTesterCmdLineOptions::leaveDirty(), DisasmCmdLineOptions::lineNumbers(), ProGeCmdLineOptions::listAvailableIntegrators(), EstimatorCmdLineOptions::longestPath(), ExplorerCmdLineOptions::numberOfConfigurations(), ProGeCmdLineOptions::preferHDLGeneration(), ExplorerCmdLineOptions::printApplications(), DictionaryToolCmdLineOptions::printConnections(), DictionaryToolCmdLineOptions::printGlobalRegister(), DictionaryToolCmdLineOptions::printMissingConnections(), ExplorerCmdLineOptions::printPlugins(), DictionaryToolCmdLineOptions::printPrimitive(), SchedulerCmdLineOptions::printResourceConstraints(), DictionaryToolCmdLineOptions::printRFConnections(), DisasmCmdLineOptions::printToStdout(), SchedulerCmdLineOptions::renameRegisters(), ProGeCmdLineOptions::resetAllRegisters(), LLVMTCECmdLineOptions::saveBackendPlugin(), PIGCmdLineOptions::showCompressors(), ProGeCmdLineOptions::syncReset(), EstimatorCmdLineOptions::totalArea(), EstimatorCmdLineOptions::totalEnergy(), ProGeCmdLineOptions::useAbsolutePaths(), TestHDBCmdLineOptions::verbose(), TTAUnitTesterCmdLineOptions::verbose(), and DictionaryToolCmdLineOptions::writeBinary().
| 
 | inline | 
Definition at line 75 of file CmdLineOptionParser.hh.
References hidden_.
Referenced by CmdLineOptions::printHelp().
| 
 | virtual | 
This implementation should never be called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in IntegerListCmdLineOptionParser, and StringListCmdLineOptionParser.
Definition at line 150 of file CmdLineOptionParser.cc.
References __func__.
Referenced by ExplorerCmdLineOptions::applicationIDToRemoveCount(), ExplorerCmdLineOptions::compilerOptionsString(), PIGCmdLineOptions::compressorParameterCount(), ProgramImageGenerator::dataStartAddress(), LLVMTCECmdLineOptions::dataStartAddress(), ExplorerCmdLineOptions::explorerPluginParameterCount(), ExplorerCmdLineOptions::hdbFileNameCount(), ExplorerCmdLineOptions::hdbFileNames(), LLVMTCECmdLineOptions::isDataStartAddressSet(), ProgramImageGenerator::isDataStartSet(), SchedulerCmdLineOptions::noaliasFunctions(), ExplorerCmdLineOptions::numberOfConfigurationsToWrite(), LLVMTCECmdLineOptions::primaryFunctions(), ExplorerCmdLineOptions::testApplicationDirectoryCount(), PIGCmdLineOptions::tpefFileCount(), and ExplorerCmdLineOptions::writeOutConfiguration().
| std::string CmdLineOptionParser::longName | ( | ) | const | 
Referenced by IntegerCmdLineOptionParser::parseValue(), UnsignedIntegerCmdLineOptionParser::parseValue(), RealCmdLineOptionParser::parseValue(), BoolCmdLineOptionParser::parseValue(), IntegerListCmdLineOptionParser::parseValue(), StringListCmdLineOptionParser::parseValue(), and CmdLineOptions::printHelp().
| 
 | private | 
Assignment not allowed.
| 
 | pure virtual | 
Pure virtual function that parses the value of option.
Implemented in IntegerCmdLineOptionParser, UnsignedIntegerCmdLineOptionParser, StringCmdLineOptionParser, OptionalStringCmdLineOptionParser, RealCmdLineOptionParser, BoolCmdLineOptionParser, IntegerListCmdLineOptionParser, and StringListCmdLineOptionParser.
Referenced by CmdLineOptions::parseAll(), and CmdLineParser::parseAll().
| 
 | virtual | 
This implementation should never be called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in RealCmdLineOptionParser.
Definition at line 114 of file CmdLineOptionParser.cc.
References __func__.
| 
 | protected | 
Sets the CmdLineOptionParser to be defined in the parsed command line.
Definition at line 159 of file CmdLineOptionParser.cc.
References defined_.
Referenced by IntegerCmdLineOptionParser::parseValue(), UnsignedIntegerCmdLineOptionParser::parseValue(), StringCmdLineOptionParser::parseValue(), OptionalStringCmdLineOptionParser::parseValue(), RealCmdLineOptionParser::parseValue(), BoolCmdLineOptionParser::parseValue(), IntegerListCmdLineOptionParser::parseValue(), and StringListCmdLineOptionParser::parseValue().
| std::string CmdLineOptionParser::shortName | ( | ) | const | 
Referenced by CmdLineOptions::printHelp().
| 
 | virtual | 
This implementation should be never called.
| WrongSubclass | Called for a wrong subclass. | 
Reimplemented in StringCmdLineOptionParser, OptionalStringCmdLineOptionParser, and StringListCmdLineOptionParser.
Definition at line 102 of file CmdLineOptionParser.cc.
References __func__.
Referenced by ExplorerCmdLineOptions::adfFileName(), TTAUnitTesterCmdLineOptions::adfFileName(), ExplorerCmdLineOptions::adfOutFileName(), LLVMTCECmdLineOptions::backendCacheDir(), PIGCmdLineOptions::bemFile(), ProGeCmdLineOptions::bemFile(), ProGeCmdLineOptions::commaSeparatedList(), ExplorerCmdLineOptions::compilerOptionsString(), PIGCmdLineOptions::compressorParameter(), PIGCmdLineOptions::compressorPlugin(), PIGCmdLineOptions::dataImageOutputFormat(), ProgramImageGenerator::dataStartAddress(), LLVMTCECmdLineOptions::dataStartAddress(), ProGeCmdLineOptions::deviceFamilyName(), ProGeCmdLineOptions::deviceName(), ProGeCmdLineOptions::dmemType(), PIGCmdLineOptions::entityName(), ProGeCmdLineOptions::entityName(), ExplorerCmdLineOptions::explorerPlugin(), ExplorerCmdLineOptions::explorerPluginParameter(), LLVMTCECmdLineOptions::getLLVMargv(), ExplorerCmdLineOptions::hdbFileName(), ProGeCmdLineOptions::hdl(), ProGeCmdLineOptions::idfFile(), ExplorerCmdLineOptions::idfFileName(), ProGeCmdLineOptions::imemType(), ProGeCmdLineOptions::integratorName(), LLVMTCECmdLineOptions::isDataStartAddressSet(), ProgramImageGenerator::isDataStartSet(), SimulatorCmdLineOptions::machineFile(), SchedulerCmdLineOptions::machineFile(), SchedulerCmdLineOptions::noaliasFunctions(), ProGeCmdLineOptions::outputDirectory(), AsmCmdLineOptions::outputFile(), DisasmCmdLineOptions::outputFile(), SchedulerCmdLineOptions::outputFile(), BEMGeneratorCmdLineOptions::outputFile(), MachInfoCmdLineOptions::outputFileNameSuffix(), MachInfoCmdLineOptions::outputFormat(), ExplorerCmdLineOptions::paretoSetValues(), ExplorerCmdLineOptions::pluginInfo(), ProGeCmdLineOptions::pluginParametersQuery(), LLVMTCECmdLineOptions::primaryFunctions(), PIGCmdLineOptions::progeOutputDirectory(), SimulatorCmdLineOptions::programFile(), PIGCmdLineOptions::programImageOutputFormat(), SimulatorCmdLineOptions::scriptString(), ProGeCmdLineOptions::sharedOutputDirectory(), BuildOpsetOptions::sourceDir(), LLVMTCECmdLineOptions::standardEmulationLib(), ExplorerCmdLineOptions::summaryOrdering(), LLVMTCECmdLineOptions::tempDir(), ExplorerCmdLineOptions::testApplicationDirectory(), EstimatorCmdLineOptions::TPEF(), PIGCmdLineOptions::tpefFile(), ProGeCmdLineOptions::tpefName(), EstimatorCmdLineOptions::traceDB(), TestHDBCmdLineOptions::vhdlSim(), TTAUnitTesterCmdLineOptions::vhdlSim(), and LLVMTCECmdLineOptions::workItemAAFile().
| 
 | virtual | 
Reimplemented in UnsignedIntegerCmdLineOptionParser.
Definition at line 90 of file CmdLineOptionParser.cc.
References __func__.
Referenced by LLVMTCECmdLineOptions::initialStackPointerValue().
| 
 | private | 
Is the value of this option set in the parsed command line?
Definition at line 106 of file CmdLineOptionParser.hh.
Referenced by isDefined(), and setDefined().
| 
 | private | 
The description of option.
Definition at line 101 of file CmdLineOptionParser.hh.
| 
 | private | 
The hidden flag. If set, no entry is printed in the normal help text.
Definition at line 103 of file CmdLineOptionParser.hh.
Referenced by isHidden().
| 
 | private | 
The full name of an option.
Definition at line 97 of file CmdLineOptionParser.hh.
| 
 | private | 
The optional alias (shorter name).
Definition at line 99 of file CmdLineOptionParser.hh.