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

Public Member Functions

 DumperCmdLineOptions ()
 
bool printFileHeaders ()
 
bool printSectionHeaders ()
 
bool printSymbols ()
 
bool printRelocations ()
 
bool printMemoryInfo ()
 
bool onlyLogicalInfo ()
 
int sectionIdCount ()
 
int sectionId (int index)
 
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 90 of file DumpTPEF.cc.

Constructor & Destructor Documentation

◆ DumperCmdLineOptions()

DumperCmdLineOptions::DumperCmdLineOptions ( )
inline

Definition at line 92 of file DumpTPEF.cc.

92  :
93  CmdLineOptions("Usage: dumptpef [options] tpeffile") {
94 
95  BoolCmdLineOptionParser* fileHeadersFlag =
97  "file-headers", "Print file headers.", "f");
98  addOption(fileHeadersFlag);
99 
100  // NOTE: -h was reserved for help
101  BoolCmdLineOptionParser* sectionHeadersFlag =
103  "section-headers", "Print section headers.", "s");
104  addOption(sectionHeadersFlag);
105 
108  "section",
109  "Print elements of section by section index.", "j");
111 
112  BoolCmdLineOptionParser* relocTablesFlag =
114  "reloc", "Print relocation tables.", "r");
115  addOption(relocTablesFlag);
116 
117  BoolCmdLineOptionParser* symbolTablesFlag =
118  new BoolCmdLineOptionParser("syms", "Print symbol tables.", "t");
119  addOption(symbolTablesFlag);
120 
121  BoolCmdLineOptionParser* memoryInfoFlag =
123  "mem", "Print information about memory usage of reserved sections.", "m");
124  addOption(memoryInfoFlag);
125 
126  BoolCmdLineOptionParser* logicalInfoFlag =
128  "logical", "Print only logical information. "
129  "Can be used for checking if two files contains same program "
130  "and data and connections even if it's in different order in "
131  "tpef file.",
132  "l");
133  addOption(logicalInfoFlag);
134  }

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

Here is the call graph for this function:

Member Function Documentation

◆ onlyLogicalInfo()

bool DumperCmdLineOptions::onlyLogicalInfo ( )
inline

Definition at line 156 of file DumpTPEF.cc.

156  {
157  return findOption("logical")->isDefined();
158  }

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

Here is the call graph for this function:

◆ printFileHeaders()

bool DumperCmdLineOptions::printFileHeaders ( )
inline

Definition at line 136 of file DumpTPEF.cc.

136  {
137  return findOption("file-headers")->isDefined();
138  }

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

Here is the call graph for this function:

◆ printMemoryInfo()

bool DumperCmdLineOptions::printMemoryInfo ( )
inline

Definition at line 152 of file DumpTPEF.cc.

152  {
153  return findOption("mem")->isDefined();
154  }

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

Here is the call graph for this function:

◆ printRelocations()

bool DumperCmdLineOptions::printRelocations ( )
inline

Definition at line 148 of file DumpTPEF.cc.

148  {
149  return findOption("reloc")->isDefined();
150  }

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

Here is the call graph for this function:

◆ printSectionHeaders()

bool DumperCmdLineOptions::printSectionHeaders ( )
inline

Definition at line 140 of file DumpTPEF.cc.

140  {
141  return findOption("section-headers")->isDefined();
142  }

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

Here is the call graph for this function:

◆ printSymbols()

bool DumperCmdLineOptions::printSymbols ( )
inline

Definition at line 144 of file DumpTPEF.cc.

144  {
145  return findOption("syms")->isDefined();
146  }

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

Here is the call graph for this function:

◆ printVersion()

void DumperCmdLineOptions::printVersion ( ) const
inlinevirtual

Implements CmdLineOptions.

Definition at line 168 of file DumpTPEF.cc.

168  {
169  std::cout << "dumptpef - TPEF Dumper "
171  << std::endl;
172  }

References Application::TCEVersionString().

Here is the call graph for this function:

◆ sectionId()

int DumperCmdLineOptions::sectionId ( int  index)
inline

Definition at line 164 of file DumpTPEF.cc.

164  {
165  return findOption("section")->integer(index);
166  }

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

Referenced by DumperCmdLineOptions().

Here is the call graph for this function:

◆ sectionIdCount()

int DumperCmdLineOptions::sectionIdCount ( )
inline

Definition at line 160 of file DumpTPEF.cc.

160  {
161  return findOption("section")->listSize();
162  }

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

Here is the call graph for this function:

The documentation for this class was generated from the following file:
CmdLineOptionParser::isDefined
bool isDefined()
Definition: CmdLineOptionParser.cc:169
DumperCmdLineOptions::sectionId
int sectionId(int index)
Definition: DumpTPEF.cc:164
IntegerListCmdLineOptionParser
Definition: CmdLineOptionParser.hh:310
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
CmdLineOptionParser::listSize
virtual int listSize() const
Definition: CmdLineOptionParser.cc:150
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BoolCmdLineOptionParser
Definition: CmdLineOptionParser.hh:278
CmdLineOptionParser::integer
virtual int integer(int index=0) const
Definition: CmdLineOptionParser.cc:84
CmdLineParser::findOption
CmdLineOptionParser * findOption(std::string name) const
Definition: CmdLineParser.cc:160
Application::TCEVersionString
static std::string TCEVersionString()
Definition: Application.cc:510