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

#include <TTAUnitTesterCmdLineOptions.hh>

Inheritance diagram for TTAUnitTesterCmdLineOptions:
Inheritance graph
Collaboration diagram for TTAUnitTesterCmdLineOptions:
Collaboration graph

Public Member Functions

 TTAUnitTesterCmdLineOptions ()
 
 ~TTAUnitTesterCmdLineOptions ()
 
bool verbose () const
 
bool leaveDirty () const
 
std::string vhdlSim () const
 
std::string adfFileName () const
 
std::string idfFileName () const
 
void printVersion () const
 
void printHelp () 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
 

Static Private Attributes

static const std::string VERBOSE_PARAM_NAME = "verbose"
 Long name of verbose output parameter.
 
static const std::string DIRTY_PARAM_NAME
 Long name of leave dirty parameter.
 
static const std::string SIM_PARAM_NAME = "simulator"
 Long name of VHDL simulator parameter.
 
static const std::string ADF_PARAM_NAME = "adf"
 Long name of ADF file parameter.
 

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

Definition at line 39 of file TTAUnitTesterCmdLineOptions.hh.

Constructor & Destructor Documentation

◆ TTAUnitTesterCmdLineOptions()

TTAUnitTesterCmdLineOptions::TTAUnitTesterCmdLineOptions ( )

Definition at line 44 of file TTAUnitTesterCmdLineOptions.cc.

44 :
45 CmdLineOptions("") {
46
49 VERBOSE_PARAM_NAME, "Enable verbose output", "v");
53 DIRTY_PARAM_NAME, "Don't delete created files", "d");
54 addOption(dirty);
55 StringCmdLineOptionParser* simulator =
57 SIM_PARAM_NAME, "HDL simulator used to simulate testbench. "
58 "Accepted values are 'ghdl' and 'modelsim'. Default is ghdl",
59 "s");
60 addOption(simulator);
63 ADF_PARAM_NAME, "If ADF file is given IDF will be validated",
64 "a");
65 addOption(adfFile);
66
67}
void addOption(CmdLineOptionParser *opt)
static const std::string VERBOSE_PARAM_NAME
Long name of verbose output parameter.
static const std::string DIRTY_PARAM_NAME
Long name of leave dirty parameter.
static const std::string ADF_PARAM_NAME
Long name of ADF file parameter.
static const std::string SIM_PARAM_NAME
Long name of VHDL simulator parameter.

References CmdLineParser::addOption(), ADF_PARAM_NAME, DIRTY_PARAM_NAME, SIM_PARAM_NAME, verbose(), and VERBOSE_PARAM_NAME.

Here is the call graph for this function:

◆ ~TTAUnitTesterCmdLineOptions()

TTAUnitTesterCmdLineOptions::~TTAUnitTesterCmdLineOptions ( )

Definition at line 69 of file TTAUnitTesterCmdLineOptions.cc.

69 {
70}

Member Function Documentation

◆ adfFileName()

std::string TTAUnitTesterCmdLineOptions::adfFileName ( ) const

Definition at line 95 of file TTAUnitTesterCmdLineOptions.cc.

95 {
97 return option->String();
98}
virtual std::string String(int index=0) const
CmdLineOptionParser * findOption(std::string name) const

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

Here is the call graph for this function:

◆ idfFileName()

std::string TTAUnitTesterCmdLineOptions::idfFileName ( ) const

Definition at line 102 of file TTAUnitTesterCmdLineOptions.cc.

102 {
103 return argument(numberOfArguments());
104}
virtual std::string argument(int index) const
virtual int numberOfArguments() const

References CmdLineParser::argument(), and CmdLineParser::numberOfArguments().

Here is the call graph for this function:

◆ leaveDirty()

bool TTAUnitTesterCmdLineOptions::leaveDirty ( ) const

Definition at line 81 of file TTAUnitTesterCmdLineOptions.cc.

81 {
83 return option->isFlagOn();
84}
virtual bool isFlagOn() const

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

Here is the call graph for this function:

◆ printHelp()

void TTAUnitTesterCmdLineOptions::printHelp ( ) const
virtual

Prints the help menu of the program.

Reimplemented from CmdLineOptions.

Definition at line 114 of file TTAUnitTesterCmdLineOptions.cc.

114 {
115 printVersion();
116 std::cout << "Usage: ttaunittester <options> IDF-file" << std::endl;
118}
virtual void printHelp() const

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

Here is the call graph for this function:

◆ printVersion()

void TTAUnitTesterCmdLineOptions::printVersion ( ) const
virtual

Implements CmdLineOptions.

Definition at line 107 of file TTAUnitTesterCmdLineOptions.cc.

107 {
108 std::cout << "ttaunittester "
109 << Application::TCEVersionString() << std::endl;
110}
static std::string TCEVersionString()

References Application::TCEVersionString().

Referenced by printHelp().

Here is the call graph for this function:

◆ verbose()

bool TTAUnitTesterCmdLineOptions::verbose ( ) const

Definition at line 74 of file TTAUnitTesterCmdLineOptions.cc.

74 {
76 return option->isFlagOn();
77}

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

Referenced by TTAUnitTesterCmdLineOptions().

Here is the call graph for this function:

◆ vhdlSim()

std::string TTAUnitTesterCmdLineOptions::vhdlSim ( ) const

Definition at line 88 of file TTAUnitTesterCmdLineOptions.cc.

88 {
90 return option->String();
91}

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

Here is the call graph for this function:

Member Data Documentation

◆ ADF_PARAM_NAME

const std::string TTAUnitTesterCmdLineOptions::ADF_PARAM_NAME = "adf"
staticprivate

Long name of ADF file parameter.

Definition at line 66 of file TTAUnitTesterCmdLineOptions.hh.

Referenced by adfFileName(), and TTAUnitTesterCmdLineOptions().

◆ DIRTY_PARAM_NAME

const std::string TTAUnitTesterCmdLineOptions::DIRTY_PARAM_NAME
staticprivate
Initial value:
=
"leave-dirty"

Long name of leave dirty parameter.

Definition at line 62 of file TTAUnitTesterCmdLineOptions.hh.

Referenced by leaveDirty(), and TTAUnitTesterCmdLineOptions().

◆ SIM_PARAM_NAME

const std::string TTAUnitTesterCmdLineOptions::SIM_PARAM_NAME = "simulator"
staticprivate

Long name of VHDL simulator parameter.

Definition at line 64 of file TTAUnitTesterCmdLineOptions.hh.

Referenced by TTAUnitTesterCmdLineOptions(), and vhdlSim().

◆ VERBOSE_PARAM_NAME

const std::string TTAUnitTesterCmdLineOptions::VERBOSE_PARAM_NAME = "verbose"
staticprivate

Long name of verbose output parameter.

Definition at line 60 of file TTAUnitTesterCmdLineOptions.hh.

Referenced by TTAUnitTesterCmdLineOptions(), and verbose().


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