# PhasicFlow: commandLine Class Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

commandLine Class Reference
Inheritance diagram for commandLine:
[legend]
Collaboration diagram for commandLine:
[legend]

## Public Types

using | Option = CLI::Option
using | ParseError = CLI::ParseError
using | any = std::any

## Public Member Functions

| commandLine (word appName)
| commandLine (word appName, word disptn)
bool | parse (int argc, char **argv)
template<typename Type >
Option * | addOption (word optionName, word description, word opText="")
template<typename Type >
Option * | addOption (word optionName, Type &bindingVar, word description, word opText="")
word | productName () const
word | productNameCopyright () const
template<typename Type >
pFlow::commandLine::Option * | addOption (word optionName, word description, word opText)
template<typename Type >
pFlow::commandLine::Option * | addOption (word optionName, Type &bindingVar, word description, word opText)

## Protected Attributes

word | appName_
List< any > | internalBinVars_

## Static Protected Attributes

static word | versionStr
static word | copyRight = "(copyright(C): www.cemf.ir)"
static word | versionName = "phasicFlow "+ versionStr
static word | versoinCopyright = versionName + " " +copyRight
static word | description

## Detailed Description

Definition at line 36 of file commandLine.hpp.

## Member Typedef Documentation

## Option

using Option = CLI::Option

Definition at line 42 of file commandLine.hpp.

## ParseError

using ParseError = CLI::ParseError

Definition at line 44 of file commandLine.hpp.

## any

using any = std::any

Definition at line 46 of file commandLine.hpp.

## Constructor & Destructor Documentation

## commandLine() [1/2]

commandLine | ( | word | appName | ) |

Definition at line 24 of file commandLine.cpp.

References commandLine::appName_, and commandLine::versionName.

## commandLine() [2/2]

commandLine | ( | word | appName,
|  | word | disptn
| ) |  |

Definition at line 33 of file commandLine.cpp.

References Bold_Text, pFlow::endl(), pFlow::floatingPointDescription(), pFlow::mOutput, commandLine::versoinCopyright, and Yellow_Text.

Here is the call graph for this function:

## Member Function Documentation

## parse()

bool parse | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 50 of file commandLine.cpp.

References count().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

## addOption() [1/4]

Option* addOption | ( | word | optionName,
|  | word | description,
|  | word | opText = `""`
| ) |  |

Referenced by main().

Here is the caller graph for this function:

## addOption() [2/4]

Option* addOption | ( | word | optionName,
|  | Type & | bindingVar,
|  | word | description,
|  | word | opText = `""`
| ) |  |

## productName()

word productName | ( |  | ) | const

inline

Definition at line 91 of file commandLine.hpp.

References commandLine::versionName.

## productNameCopyright()

word productNameCopyright | ( |  | ) | const

inline

Definition at line 96 of file commandLine.hpp.

References commandLine::versoinCopyright.

Referenced by main().

Here is the caller graph for this function:

## addOption() [3/4]

pFlow::commandLine::Option* addOption | ( | word | optionName,
|  | word | description,
|  | word | opText
| ) |  |

Definition at line 108 of file commandLine.hpp.

References commandLine::description, fatalExit, and commandLine::internalBinVars_.

## addOption() [4/4]

pFlow::commandLine::Option* addOption | ( | word | optionName,
|  | Type & | bindingVar,
|  | word | description,
|  | word | opText
| ) |  |

Definition at line 129 of file commandLine.hpp.

References fatalExit.

## Member Data Documentation

## appName_

word appName_

protected

Definition at line 50 of file commandLine.hpp.

Referenced by commandLine::commandLine().

## internalBinVars_

List<any> internalBinVars_

protected

Definition at line 52 of file commandLine.hpp.

Referenced by commandLine::addOption().

## versionStr

word versionStr

inlinestaticprotected

Initial value:
= "v-"+
int322Word(phasicFlow_VERSION_MAJOR)+
"."+
int322Word(phasicFlow_VERSION_MINOR)

Definition at line 54 of file commandLine.hpp.

## copyRight

word copyRight = "(copyright(C): www.cemf.ir)"

inlinestaticprotected

Definition at line 58 of file commandLine.hpp.

## versionName

word versionName = "phasicFlow "+ versionStr

inlinestaticprotected

Definition at line 60 of file commandLine.hpp.

Referenced by commandLine::commandLine(), and commandLine::productName().

## versoinCopyright

word versoinCopyright = versionName + " " +copyRight

inlinestaticprotected

Definition at line 62 of file commandLine.hpp.

Referenced by commandLine::commandLine(), and commandLine::productNameCopyright().

## description

word description

inlinestaticprotected

Initial value:
= "Command line help for "+
versoinCopyright +"\n"

Definition at line 64 of file commandLine.hpp.

Referenced by commandLine::addOption().

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

- src/phasicFlow/commandLine/commandLine.hpp
- src/phasicFlow/commandLine/commandLine.cpp

pFlow::commandLine::versoinCopyright
static word versoinCopyright
Definition: commandLine.hpp:62
pFlow::int322Word
word int322Word(const int32 &v)
Convert int32 to word.
Definition: bTypesFunctions.cpp:110