SpinParser  1.0
Public Member Functions | Protected Attributes | List of all members
CommandLineOptions Class Reference

Parser object, which can be fed with argc/argv information and which then holds the parsed values in its member variables. More...

#include <CommandLineOptions.hpp>

Public Member Functions

 CommandLineOptions (int argc, char **argv)
 Construct a new CommandLineOptions object and parse argc/argv information. More...
 
bool help () const
 Retrieve the '–help' flag setting. More...
 
bool verbose () const
 Retrieve the '–verbose' flag setting. More...
 
int checkpointTime () const
 Retrieve the value of the '–checkpointTime' flag. More...
 
bool forceRestart () const
 Retrieve the '–forceRestart' flag setting. More...
 
bool deferMeasurements () const
 Retrieve the '–defer' flag setting. More...
 
bool debugLattice () const
 Retrieve the '–debugLattice' flag setting. More...
 
std::string taskFile () const
 Retrieve the value of the '–taskFile' flag. More...
 
std::string resourcePath () const
 Retrieve the value of the '–resourcePath' flag. More...
 

Protected Attributes

bool _help
 Help flag '–help' is set.
 
bool _verbose
 Verbose flag '–verbose' is set.
 
int _checkpointTime
 Value of the '–checkpointTime' argument.
 
bool _forceRestart
 Force flag '–forceRestart' is set.
 
bool _deferMeasurements
 Defer flag '–defer' is set.
 
bool _debugLattice
 Lattice debug flag '–debugLattice' is set.
 
std::string _taskFile
 Value of the '–taskFile' argument.
 
std::string _resourcePath
 Value of the '–resourcePath' argument.
 

Detailed Description

Parser object, which can be fed with argc/argv information and which then holds the parsed values in its member variables.

Constructor & Destructor Documentation

◆ CommandLineOptions()

CommandLineOptions::CommandLineOptions ( int  argc,
char **  argv 
)

Construct a new CommandLineOptions object and parse argc/argv information.

Parameters
argcArgument count as passed to the program call.
argvArgument vector as passed to the program call.

Member Function Documentation

◆ checkpointTime()

int CommandLineOptions::checkpointTime ( ) const

Retrieve the value of the '–checkpointTime' flag.

Returns
int Value of the '–checkpointTime' flag.

◆ debugLattice()

bool CommandLineOptions::debugLattice ( ) const

Retrieve the '–debugLattice' flag setting.

Returns
bool Return true, if the '–debugLattice' flag is set. Otherwise, return false.

◆ deferMeasurements()

bool CommandLineOptions::deferMeasurements ( ) const

Retrieve the '–defer' flag setting.

Returns
bool Return true, if the '–defer' flag is set. Otherwise, return false.

◆ forceRestart()

bool CommandLineOptions::forceRestart ( ) const

Retrieve the '–forceRestart' flag setting.

Returns
bool Return true, if the '–forceRestart' flag is set. Otherwise, return false.

◆ help()

bool CommandLineOptions::help ( ) const

Retrieve the '–help' flag setting.

Returns
bool Return true, if the '–help' flag is set. Otherwise, return false.

◆ resourcePath()

std::string CommandLineOptions::resourcePath ( ) const

Retrieve the value of the '–resourcePath' flag.

Returns
std::string Value of the '–resourcePath' flag.

◆ taskFile()

std::string CommandLineOptions::taskFile ( ) const

Retrieve the value of the '–taskFile' flag.

Returns
std::string Value of the '–taskFile' flag.

◆ verbose()

bool CommandLineOptions::verbose ( ) const

Retrieve the '–verbose' flag setting.

Returns
bool Return true, if the '–verbose' flag is set. Otherwise, return false.

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