OpenASIP  2.0
Public Member Functions | List of all members
AsmCmdLineOptions Class Reference
Inheritance diagram for AsmCmdLineOptions:
Inheritance graph
Collaboration diagram for AsmCmdLineOptions:
Collaboration graph

Public Member Functions

 AsmCmdLineOptions ()
 
std::string outputFile ()
 
bool printWarnings ()
 
void printVersion () 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 void printHelp () const
 
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
 

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

Detailed Description

Commandline options.

Definition at line 52 of file tceasm.cc.

Constructor & Destructor Documentation

◆ AsmCmdLineOptions()

AsmCmdLineOptions::AsmCmdLineOptions ( )
inline

Definition at line 54 of file tceasm.cc.

54  :
55  CmdLineOptions("Usage: tceasm [options] adffile assemblerfile") {
56 
58  new StringCmdLineOptionParser("outputfile", "Name of the output file.", "o");
59 
61 
62  BoolCmdLineOptionParser* quietMode =
63  new BoolCmdLineOptionParser("quiet", "Don't print warnings.", "q");
64 
65  addOption(quietMode);
66  }

Member Function Documentation

◆ outputFile()

std::string AsmCmdLineOptions::outputFile ( )
inline

Definition at line 68 of file tceasm.cc.

68  {
69  return findOption("outputfile")->String();
70  }

◆ printVersion()

void AsmCmdLineOptions::printVersion ( ) const
inlinevirtual

Implements CmdLineOptions.

Definition at line 76 of file tceasm.cc.

76  {
77  std::cout << "tceasm - OpenASIP TTA parallel assembler "
79  << std::endl;
80  }

References Application::TCEVersionString().

Here is the call graph for this function:

◆ printWarnings()

bool AsmCmdLineOptions::printWarnings ( )
inline

Definition at line 72 of file tceasm.cc.

72  {
73  return findOption("quiet")->isFlagOff();
74  }

The documentation for this class was generated from the following file:
CmdLineOptionParser::isFlagOff
virtual bool isFlagOff() const
Definition: CmdLineOptionParser.cc:138
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BoolCmdLineOptionParser
Definition: CmdLineOptionParser.hh:278
AsmCmdLineOptions::outputFile
std::string outputFile()
Definition: tceasm.cc:68
CmdLineOptionParser::String
virtual std::string String(int index=0) const
Definition: CmdLineOptionParser.cc:102
CmdLineParser::findOption
CmdLineOptionParser * findOption(std::string name) const
Definition: CmdLineParser.cc:160
Application::TCEVersionString
static std::string TCEVersionString()
Definition: Application.cc:510
StringCmdLineOptionParser
Definition: CmdLineOptionParser.hh:180