FEDEM Solver  R8.0
Source code of the dynamics solver
Classes | Functions
cmdLineArgInit.C File Reference

This file contains C++ code for setting up the command-line handler. More...

#include "SignalHandler.H"
#include "FFaLib/FFaDefinitions/FFaMsg.H"
#include "FFaLib/FFaCmdLineArg/FFaCmdLineArg.H"
#include "FFaLib/FFaOS/FFaFortran.H"
#include "Admin/FedemAdmin.H"
#include <cstring>
Include dependency graph for cmdLineArgInit.C:

Classes

class  F90Msg
 A sub-class of FFaMsg that passes the list-messages to Fortran. More...
 

Functions

static void emergencyExit ()
 Cleans up on disk on emergency exists, exceptions, etc. More...
 
void cmdLineArgInit (int argc, char **argv)
 Initializes the command-line parser. More...
 
void redirectOutput2Ftn (int whichFile)
 Redirects all error messages from C++ to F90. More...
 
void readOptionFiles (const char *program, int whichFile)
 Reads the command-line options files. More...
 

Detailed Description

This file contains C++ code for setting up the command-line handler.

The file contains some extensions of the functions located in cmdLineArgInitStd.C, to deal with output redirection, program versioning, signal handling, etc.

Function Documentation

◆ cmdLineArgInit()

void cmdLineArgInit ( int  argc,
char **  argv 
)

Initializes the command-line parser.

Parameters
[in]argcNumber of command-line arguments (including program name)
[in]argvList of command-line arguments

◆ emergencyExit()

static void emergencyExit ( )
static

Cleans up on disk on emergency exists, exceptions, etc.

Used by signal handlers only.

◆ readOptionFiles()

void readOptionFiles ( const char *  program,
int  whichFile 
)

Reads the command-line options files.

Parameters
[in]programName of the program module
[in]whichFileOption for console output redirection

◆ redirectOutput2Ftn()

void redirectOutput2Ftn ( int  whichFile)

Redirects all error messages from C++ to F90.

Parameters
[in]whichFileDefines to which file we should write (see below)
  • whichFile < 0: No redirection of C++ messages.
  • whichFile = 0: Redirection to Output List only.
  • whichFile = 1: Redirection to the res-file only (default).
  • whichFile = 2: Redirection to the res-file and Output List.