OpenASIP  2.0
Public Member Functions | List of all members
BuildOpsetOptions Class Reference

#include <BuildOpset.hh>

Inheritance diagram for BuildOpsetOptions:
Inheritance graph
Collaboration diagram for BuildOpsetOptions:
Collaboration graph

Public Member Functions

 BuildOpsetOptions ()
 
virtual ~BuildOpsetOptions ()
 
virtual void printVersion () const
 
std::string install () const
 
std::string sourceDir () const
 
bool ignore () 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

Class that handles options passed to build_opset.

Definition at line 42 of file BuildOpset.hh.

Constructor & Destructor Documentation

◆ BuildOpsetOptions()

BuildOpsetOptions::BuildOpsetOptions ( )

Constructor.

Definition at line 62 of file BuildOpset.cc.

62  :
63  CmdLineOptions("Usage: buildopset [options] module_name") {
64 
65  TCEString desc;
66  desc += "\n\tIgnore the case whereby the source file containing the\n";
67  desc += "\toperation behavior model code are not found. By default, the\n";
68  desc += "\tOSAL Builder aborts if it cannot build the dynamic module.\n";
69  desc += "\tThis option may be used in combination with install option\n";
70  desc += "\tto install XML data even if operation behavior definitions\n";
71  desc += "\tdo not exist.";
73  new BoolCmdLineOptionParser("ignore", desc, "b");
75 
76  desc = "\n\tEnter explicit directory where the behavior definition\n";
77  desc += "\tsource file to be used is found.\n";
79  new StringCmdLineOptionParser("source-dir", desc, "s");
81 }

References CmdLineParser::addOption(), ignore(), and sourceDir().

Here is the call graph for this function:

◆ ~BuildOpsetOptions()

BuildOpsetOptions::~BuildOpsetOptions ( )
virtual

Destructor

Definition at line 86 of file BuildOpset.cc.

86  {
87 }

Member Function Documentation

◆ ignore()

bool BuildOpsetOptions::ignore ( ) const

Returns the value of the ignore option.

Returns
The value of the ignore option.

Definition at line 114 of file BuildOpset.cc.

114  {
115  return findOption("ignore")->isFlagOn();
116 }

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

Referenced by BuildOpsetOptions().

Here is the call graph for this function:

◆ install()

std::string BuildOpsetOptions::install ( ) const

◆ printVersion()

void BuildOpsetOptions::printVersion ( ) const
virtual

Prints the version of the application.

Implements CmdLineOptions.

Definition at line 93 of file BuildOpset.cc.

93  {
94  cout << "buildopset - Operation behavior module builder "
95  << Application::TCEVersionString() << endl;
96 }

References Application::TCEVersionString().

Here is the call graph for this function:

◆ sourceDir()

string BuildOpsetOptions::sourceDir ( ) const

Returns the value of the source-dir option.

Returns
The value of the source-dir option.

Definition at line 104 of file BuildOpset.cc.

104  {
105  return findOption("source-dir")->String();
106 }

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

Referenced by BuildOpsetOptions().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
CmdLineOptionParser::isFlagOn
virtual bool isFlagOn() const
Definition: CmdLineOptionParser.cc:126
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BoolCmdLineOptionParser
Definition: CmdLineOptionParser.hh:278
BuildOpsetOptions::ignore
bool ignore() const
Definition: BuildOpset.cc:114
BuildOpsetOptions::sourceDir
std::string sourceDir() const
Definition: BuildOpset.cc:104
CmdLineOptionParser::String
virtual std::string String(int index=0) const
Definition: CmdLineOptionParser.cc:102
TCEString
Definition: TCEString.hh:53
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