OpenASIP  2.0
Public Member Functions | Static Private Attributes | List of all members
BEMGeneratorCmdLineOptions Class Reference

#include <BEMGeneratorCmdLineOptions.hh>

Inheritance diagram for BEMGeneratorCmdLineOptions:
Inheritance graph
Collaboration diagram for BEMGeneratorCmdLineOptions:
Collaboration graph

Public Member Functions

 BEMGeneratorCmdLineOptions ()
 
virtual ~BEMGeneratorCmdLineOptions ()
 
std::string adfFile () const
 
std::string outputFile () const
 
virtual void printVersion () const
 
virtual 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 ADF_PARAM_NAME = "adf"
 Long name of the ADF file parameter. More...
 
static const std::string OUTPUT_FILE_PARAM_NAME
 Long name of the output file parameter. More...
 

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

Command line options for the command line interface of bem generator (createbem).

Definition at line 42 of file BEMGeneratorCmdLineOptions.hh.

Constructor & Destructor Documentation

◆ BEMGeneratorCmdLineOptions()

BEMGeneratorCmdLineOptions::BEMGeneratorCmdLineOptions ( )

The constructor.

Definition at line 43 of file BEMGeneratorCmdLineOptions.cc.

43  :
44  CmdLineOptions("") {
45 
47  OUTPUT_FILE_PARAM_NAME, "The name of the output file", "o");
49 }

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

Here is the call graph for this function:

◆ ~BEMGeneratorCmdLineOptions()

BEMGeneratorCmdLineOptions::~BEMGeneratorCmdLineOptions ( )
virtual

The destructor.

Definition at line 55 of file BEMGeneratorCmdLineOptions.cc.

55  {
56 }

Member Function Documentation

◆ adfFile()

std::string BEMGeneratorCmdLineOptions::adfFile ( ) const

Returns the name of the ADF file given as command line parameter.

Returns
The name of the ADF file.

Definition at line 65 of file BEMGeneratorCmdLineOptions.cc.

65  {
66  if (numberOfArguments() < 1) {
67  return "";
68  } else {
69  return argument(numberOfArguments());
70  }
71 }

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

Here is the call graph for this function:

◆ outputFile()

std::string BEMGeneratorCmdLineOptions::outputFile ( ) const

Returns the name of the output file given as command line parameter.

Returns
The name of the output file.

Definition at line 80 of file BEMGeneratorCmdLineOptions.cc.

80  {
82 }

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

Referenced by BEMGeneratorCmdLineOptions().

Here is the call graph for this function:

◆ printHelp()

void BEMGeneratorCmdLineOptions::printHelp ( ) const
virtual

Prints the help.

Reimplemented from CmdLineOptions.

Definition at line 105 of file BEMGeneratorCmdLineOptions.cc.

105  {
106  printVersion();
107  std::cout << "Usage: createbem [OPTION] <ADF File>";
109 }

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

Here is the call graph for this function:

◆ printVersion()

void BEMGeneratorCmdLineOptions::printVersion ( ) const
virtual

Prints the version of the user interface.

Implements CmdLineOptions.

Definition at line 89 of file BEMGeneratorCmdLineOptions.cc.

89  {
90  BEMGeneratorCLITextGenerator textGenerator;
91  std::cout
93  str()
94  << " "
95  << textGenerator.text(
97  << std::endl;
98 }

References Texts::TextGenerator::text(), BEMGeneratorCLITextGenerator::TXT_CLI_TITLE, and BEMGeneratorCLITextGenerator::TXT_CLI_VERSION.

Referenced by printHelp().

Here is the call graph for this function:

Member Data Documentation

◆ ADF_PARAM_NAME

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

Long name of the ADF file parameter.

Definition at line 54 of file BEMGeneratorCmdLineOptions.hh.

◆ OUTPUT_FILE_PARAM_NAME

const std::string BEMGeneratorCmdLineOptions::OUTPUT_FILE_PARAM_NAME
staticprivate
Initial value:
=
"output"

Long name of the output file parameter.

Definition at line 56 of file BEMGeneratorCmdLineOptions.hh.

Referenced by BEMGeneratorCmdLineOptions(), and outputFile().


The documentation for this class was generated from the following files:
BEMGeneratorCmdLineOptions::printVersion
virtual void printVersion() const
Definition: BEMGeneratorCmdLineOptions.cc:89
BEMGeneratorCLITextGenerator::TXT_CLI_VERSION
@ TXT_CLI_VERSION
Definition: BEMGeneratorCLITextGenerator.hh:50
CmdLineParser::numberOfArguments
virtual int numberOfArguments() const
BEMGeneratorCmdLineOptions::outputFile
std::string outputFile() const
Definition: BEMGeneratorCmdLineOptions.cc:80
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
BEMGeneratorCmdLineOptions::OUTPUT_FILE_PARAM_NAME
static const std::string OUTPUT_FILE_PARAM_NAME
Long name of the output file parameter.
Definition: BEMGeneratorCmdLineOptions.hh:56
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BEMGeneratorCLITextGenerator
Definition: BEMGeneratorCLITextGenerator.hh:42
CmdLineOptions::printHelp
virtual void printHelp() const
Definition: CmdLineOptions.cc:262
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
BEMGeneratorCLITextGenerator::TXT_CLI_TITLE
@ TXT_CLI_TITLE
Definition: BEMGeneratorCLITextGenerator.hh:49
CmdLineParser::argument
virtual std::string argument(int index) const
StringCmdLineOptionParser
Definition: CmdLineOptionParser.hh:180