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

#include <BEMViewerCmdLineOptions.hh>

Inheritance diagram for BEMViewerCmdLineOptions:
Inheritance graph
Collaboration diagram for BEMViewerCmdLineOptions:
Collaboration graph

Public Member Functions

 BEMViewerCmdLineOptions ()
 
virtual ~BEMViewerCmdLineOptions ()
 
std::string bemFile () 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
 

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 viewbem.

Definition at line 41 of file BEMViewerCmdLineOptions.hh.

Constructor & Destructor Documentation

◆ BEMViewerCmdLineOptions()

BEMViewerCmdLineOptions::BEMViewerCmdLineOptions ( )

The constructor.

Definition at line 39 of file BEMViewerCmdLineOptions.cc.

39  :
41 }

◆ ~BEMViewerCmdLineOptions()

BEMViewerCmdLineOptions::~BEMViewerCmdLineOptions ( )
virtual

The destructor.

Definition at line 47 of file BEMViewerCmdLineOptions.cc.

47  {
48 }

Member Function Documentation

◆ bemFile()

std::string BEMViewerCmdLineOptions::bemFile ( ) const

Returns the given BEM file.

Returns
The BEM file.

Definition at line 57 of file BEMViewerCmdLineOptions.cc.

57  {
58  if (numberOfArguments() < 1) {
59  return "";
60  } else {
61  return argument(1);
62  }
63 }

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

Here is the call graph for this function:

◆ printHelp()

void BEMViewerCmdLineOptions::printHelp ( ) const
virtual

Prints the help.

Reimplemented from CmdLineOptions.

Definition at line 80 of file BEMViewerCmdLineOptions.cc.

80  {
81  printVersion();
82  std::cout << "Usage: viewbem <bemfile>" << std::endl;
83 }

References printVersion().

Here is the call graph for this function:

◆ printVersion()

void BEMViewerCmdLineOptions::printVersion ( ) const
virtual

Prints the version of the application.

Implements CmdLineOptions.

Definition at line 70 of file BEMViewerCmdLineOptions.cc.

70  {
71  std::cout << "viewbem - BEM Viewer "
72  << Application::TCEVersionString() << std::endl;
73 }

References Application::TCEVersionString().

Referenced by printHelp().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
CmdLineParser::numberOfArguments
virtual int numberOfArguments() const
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BEMViewerCmdLineOptions::printVersion
virtual void printVersion() const
Definition: BEMViewerCmdLineOptions.cc:70
CmdLineParser::argument
virtual std::string argument(int index) const
Application::TCEVersionString
static std::string TCEVersionString()
Definition: Application.cc:510