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

Public Member Functions

 DisasmCmdLineOptions ()
 
std::string outputFile ()
 
bool outputFileDefined ()
 
bool printToStdout ()
 
void printVersion () const
 
virtual ~DisasmCmdLineOptions ()
 
 DisasmCmdLineOptions ()
 
std::string outputFile ()
 
bool outputFileDefined ()
 
bool lineNumbers ()
 
bool flatFile ()
 
bool printToStdout ()
 
void printVersion () const
 
virtual ~DisasmCmdLineOptions ()
 
- 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 79 of file tpef2pasm.cc.

Constructor & Destructor Documentation

◆ DisasmCmdLineOptions() [1/2]

DisasmCmdLineOptions::DisasmCmdLineOptions ( )
inline

Definition at line 81 of file tpef2pasm.cc.

82  : CmdLineOptions("Usage: tpef2pasm [options] adffile tpeffile") {
84  "outputfile", "Name of the output file.", "o");
85 
87  "stdout", "Print to standard output", "s");
88 
90  addOption(toStdout);
91  }

References CmdLineParser::addOption(), and outputFile().

Here is the call graph for this function:

◆ ~DisasmCmdLineOptions() [1/2]

virtual DisasmCmdLineOptions::~DisasmCmdLineOptions ( )
inlinevirtual

Definition at line 114 of file tpef2pasm.cc.

114 {}

◆ DisasmCmdLineOptions() [2/2]

DisasmCmdLineOptions::DisasmCmdLineOptions ( )
inline

Definition at line 62 of file tcedisasm.cc.

62  :
63  CmdLineOptions("Usage: tcedisasm [options] adffile tpeffile") {
64 
67  "outputfile", "Name of the output file.", "o");
68 
71  "linenumbers", "Print line numbers","n");
72 
75  "flat", "The instructions only with file line numbers "
76  "matching instruction indices","F");
77 
78  BoolCmdLineOptionParser* toStdout =
80  "stdout", "Print to standard output","s");
81 
85  addOption(toStdout);
86  }

References CmdLineParser::addOption(), flatFile(), lineNumbers(), and outputFile().

Here is the call graph for this function:

◆ ~DisasmCmdLineOptions() [2/2]

virtual DisasmCmdLineOptions::~DisasmCmdLineOptions ( )
inlinevirtual

Definition at line 113 of file tcedisasm.cc.

113  {
114  }

Member Function Documentation

◆ flatFile()

bool DisasmCmdLineOptions::flatFile ( )
inline

Definition at line 100 of file tcedisasm.cc.

100  {
101  return findOption("flat")->isFlagOn();
102  }

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

Referenced by DisasmCmdLineOptions().

Here is the call graph for this function:

◆ lineNumbers()

bool DisasmCmdLineOptions::lineNumbers ( )
inline

Definition at line 96 of file tcedisasm.cc.

96  {
97  return findOption("linenumbers")->isFlagOn();
98  }

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

Referenced by DisasmCmdLineOptions().

Here is the call graph for this function:

◆ outputFile() [1/2]

std::string DisasmCmdLineOptions::outputFile ( )
inline

Definition at line 88 of file tcedisasm.cc.

88  {
89  return findOption("outputfile")->String();
90  }

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

Here is the call graph for this function:

◆ outputFile() [2/2]

std::string DisasmCmdLineOptions::outputFile ( )
inline

Definition at line 94 of file tpef2pasm.cc.

94  {
95  return findOption("outputfile")->String();
96  }

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

Referenced by DisasmCmdLineOptions().

Here is the call graph for this function:

◆ outputFileDefined() [1/2]

bool DisasmCmdLineOptions::outputFileDefined ( )
inline

Definition at line 92 of file tcedisasm.cc.

92  {
93  return findOption("outputfile")->isDefined();
94  }

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

Here is the call graph for this function:

◆ outputFileDefined() [2/2]

bool DisasmCmdLineOptions::outputFileDefined ( )
inline

Definition at line 99 of file tpef2pasm.cc.

99  {
100  return findOption("outputfile")->isDefined();
101  }

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

Here is the call graph for this function:

◆ printToStdout() [1/2]

bool DisasmCmdLineOptions::printToStdout ( )
inline

Definition at line 104 of file tcedisasm.cc.

104  {
105  return findOption("stdout")->isFlagOn();
106  }

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

Here is the call graph for this function:

◆ printToStdout() [2/2]

bool DisasmCmdLineOptions::printToStdout ( )
inline

Definition at line 104 of file tpef2pasm.cc.

104  {
105  return findOption("stdout")->isFlagOn();
106  }

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

Here is the call graph for this function:

◆ printVersion() [1/2]

void DisasmCmdLineOptions::printVersion ( ) const
inlinevirtual

Implements CmdLineOptions.

Definition at line 108 of file tcedisasm.cc.

108  {
109  std::cout << "tcedisasm - OpenASIP TTA parallel disassembler "
110  << Application::TCEVersionString() << std::endl;
111  }

References Application::TCEVersionString().

Here is the call graph for this function:

◆ printVersion() [2/2]

void DisasmCmdLineOptions::printVersion ( ) const
inlinevirtual

Implements CmdLineOptions.

Definition at line 109 of file tpef2pasm.cc.

109  {
110  std::cout << "tcedisasm - OpenASIP TTA parallel disassembler "
111  << Application::TCEVersionString() << std::endl;
112  }

References Application::TCEVersionString().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
CmdLineOptionParser::isDefined
bool isDefined()
Definition: CmdLineOptionParser.cc:169
CmdLineOptionParser::isFlagOn
virtual bool isFlagOn() const
Definition: CmdLineOptionParser.cc:126
DisasmCmdLineOptions::flatFile
bool flatFile()
Definition: tcedisasm.cc:100
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BoolCmdLineOptionParser
Definition: CmdLineOptionParser.hh:278
CmdLineOptionParser::String
virtual std::string String(int index=0) const
Definition: CmdLineOptionParser.cc:102
DisasmCmdLineOptions::lineNumbers
bool lineNumbers()
Definition: tcedisasm.cc:96
DisasmCmdLineOptions::outputFile
std::string outputFile()
Definition: tpef2pasm.cc:94
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