FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | Private Types | Private Attributes | List of all members
FFaOptionFileCreator Class Reference

Class for writing command-line option files for the solver modules. More...

#include <FFaOptionFileCreator.H>

Public Member Functions

 FFaOptionFileCreator (const std::string &fname="")
 Default constructor. More...
 
void add (const std::string &optionName, bool val)
 Adds a bool-valued command-line option. More...
 
void add (const std::string &optionName, int val)
 Adds an integer-valued command-line option. More...
 
void add (const std::string &optionName, double val)
 Adds a real-valued (double) command-line option. More...
 
void add (const std::string &optionName, const std::pair< double, double > &val)
 Adds a two-valued real (double) command-line option. More...
 
void add (const std::string &optionName, const FaVec3 &val)
 Adds a FaVec3-valued command-line option. More...
 
void add (const std::string &optionName, const std::vector< double > &val)
 Adds a vector-valued (double) command-line option. More...
 
void add (const std::string &optionName, const std::string &val, bool addQuotes=true)
 Adds a string-valued command-line option. More...
 
void addComment (const std::string &comment, bool lineInFront=false)
 Adds a comment line. More...
 
std::vector< std::string > getOptVector () const
 Returns all options with values as a vector of strings. More...
 
bool writeOptFile () const
 Writes the command-line options to file. More...
 

Private Types

typedef std::pair< std::string, std::string > Option
 Convenience type definition. More...
 

Private Attributes

std::vector< OptionmyOptions
 List of command-line options with value. More...
 
std::string myFilename
 Name of the file to be written. More...
 

Detailed Description

Class for writing command-line option files for the solver modules.

Member Typedef Documentation

◆ Option

typedef std::pair<std::string,std::string> FFaOptionFileCreator::Option
private

Convenience type definition.

Constructor & Destructor Documentation

◆ FFaOptionFileCreator()

FFaOptionFileCreator::FFaOptionFileCreator ( const std::string &  fname = "")
inline

Default constructor.

Member Function Documentation

◆ add() [1/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
bool  val 
)

Adds a bool-valued command-line option.

◆ add() [2/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
const FaVec3 val 
)

Adds a FaVec3-valued command-line option.

◆ add() [3/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
const std::pair< double, double > &  val 
)

Adds a two-valued real (double) command-line option.

◆ add() [4/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
const std::string &  val,
bool  addQuotes = true 
)

Adds a string-valued command-line option.

◆ add() [5/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
const std::vector< double > &  val 
)

Adds a vector-valued (double) command-line option.

◆ add() [6/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
double  val 
)

Adds a real-valued (double) command-line option.

◆ add() [7/7]

void FFaOptionFileCreator::add ( const std::string &  optionName,
int  val 
)

Adds an integer-valued command-line option.

◆ addComment()

void FFaOptionFileCreator::addComment ( const std::string &  comment,
bool  lineInFront = false 
)

Adds a comment line.

◆ getOptVector()

std::vector< std::string > FFaOptionFileCreator::getOptVector ( ) const

Returns all options with values as a vector of strings.

◆ writeOptFile()

bool FFaOptionFileCreator::writeOptFile ( ) const

Writes the command-line options to file.

Member Data Documentation

◆ myFilename

std::string FFaOptionFileCreator::myFilename
private

Name of the file to be written.

◆ myOptions

std::vector<Option> FFaOptionFileCreator::myOptions
private

List of command-line options with value.


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