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

Interface class for various user feedback. More...

#include <FFaMsg.H>

Inheritance diagram for FFaMsg:
Inheritance graph
[legend]
Collaboration diagram for FFaMsg:
Collaboration graph
[legend]

Public Types

enum  FFaDialogType {
  DISMISS_WARNING , DISMISS_ERROR , DISMISS_INFO , WARNING ,
  ERROR , OK , OK_CANCEL , YES_NO ,
  YES_NO_CANCEL , _ALL_ , OK_ALL_CANCEL , YES_ALL_NO ,
  YES_ALL_NO_ALL , YES_ALL_NO_CANCEL , YES_ALL_NO_ALL_CANCEL , YES_NO_ALL ,
  YES_NO_ALL_CANCEL , GENERIC
}
 Enums defining various dialog box types. More...
 

Public Member Functions

 FFaMsg ()
 Default constructor. More...
 
virtual ~FFaMsg ()
 Empty destructor. More...
 
virtual bool openListFile (const char *=NULL, bool=false)
 Opens a list file containing a copy of the output list window. More...
 
virtual void closeListFile ()
 Closes the list file. More...
 

Static Public Member Functions

static void setMessager (FFaMsg *messager=NULL)
 Sets the real messager object to be used. More...
 
static FFaMsggetMessager ()
 Returns the current messager object. More...
 
static bool usingDefault ()
 Returns true if we are using the default messager. More...
 
static void resetToAllAnswer (const FFaDialogType type=_ALL_)
 
static int dialog (const std::string &message, const FFaDialogType type=DISMISS_WARNING, const char **genericButtons=(const char **) NULL)
 Shows a dialog according to the dialog type. More...
 
static int dialog (const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts)
 
static int dialog (int &returnedSelectionIdx, const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts, const std::vector< std::string > &selectionList)
 
static void list (const std::string &str, bool onScreen=false)
 
static void tip (const std::string &str)
 
static void setStatus (const std::string &statusText)
 
static void changeStatus (const std::string &statusText)
 
static void pushStatus (const std::string &statusText)
 
static void popStatus ()
 
static void enableSubSteps (int steps)
 
static void setSubStep (int step)
 
static void disableSubSteps ()
 
static void displayTime (int hour, int min, int sec)
 
static void clearTime ()
 
static void setSubTask (const std::string &taskText)
 
static void enableProgress (int nSteps)
 
static void setProgress (int progressStep)
 
static void disableProgress ()
 

Protected Member Functions

virtual int dialogVt (const std::string &message, const FFaDialogType type, const char **genericButtons)
 
virtual int dialogVt (const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts)
 
virtual int dialogVt (int &returnedSelectionIdx, const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts, const std::vector< std::string > &selectionList)
 
virtual void listVt (const std::string &str, bool onScreen=false)
 
virtual void tipVt (const std::string &str)
 
virtual void setStatusVt (const std::string &)
 
virtual void changeStatusVt (const std::string &)
 
virtual void pushStatusVt (const std::string &)
 
virtual void popStatusVt ()
 
virtual void enableSubStepsVt (int)
 
virtual void setSubStepVt (int)
 
virtual void disableSubStepsVt ()
 
virtual void displayTimeVt (int, int, int)
 
virtual void clearTimeVt ()
 
virtual void setSubTaskVt (const std::string &)
 
virtual void enableProgressVt (int)
 
virtual void setProgressVt (int)
 
virtual void disableProgressVt ()
 

Static Protected Member Functions

static void showStatus ()
 

Static Protected Attributes

static std::stack< std::string > ourStatuses
 

Static Private Attributes

static std::map< FFaDialogType, int > ourToAllAnswer
 
static FFaMsgourCurrentMessager = NULL
 

Friends

FFaMsgoperator<< (FFaMsg &, const std::string &)
 
FFaMsgoperator<< (FFaMsg &, const char *)
 
FFaMsgoperator<< (FFaMsg &, const FaVec3 &)
 
FFaMsgoperator<< (FFaMsg &, double)
 
FFaMsgoperator<< (FFaMsg &, char)
 
FFaMsgoperator<< (FFaMsg &, int)
 
FFaMsgoperator<< (FFaMsg &, long long int)
 
FFaMsgoperator<< (FFaMsg &, size_t)
 

Detailed Description

Interface class for various user feedback.

Member Enumeration Documentation

◆ FFaDialogType

Enums defining various dialog box types.

Enumerator
DISMISS_WARNING 
DISMISS_ERROR 
DISMISS_INFO 
WARNING 
ERROR 
OK 
OK_CANCEL 
YES_NO 
YES_NO_CANCEL 
_ALL_ 
OK_ALL_CANCEL 
YES_ALL_NO 
YES_ALL_NO_ALL 
YES_ALL_NO_CANCEL 
YES_ALL_NO_ALL_CANCEL 
YES_NO_ALL 
YES_NO_ALL_CANCEL 
GENERIC 

Constructor & Destructor Documentation

◆ FFaMsg()

FFaMsg::FFaMsg ( )
inline

Default constructor.

◆ ~FFaMsg()

virtual FFaMsg::~FFaMsg ( )
inlinevirtual

Empty destructor.

Member Function Documentation

◆ changeStatus()

void FFaMsg::changeStatus ( const std::string &  statusText)
static

◆ changeStatusVt()

virtual void FFaMsg::changeStatusVt ( const std::string &  )
inlineprotectedvirtual

◆ clearTime()

void FFaMsg::clearTime ( )
static

◆ clearTimeVt()

virtual void FFaMsg::clearTimeVt ( )
inlineprotectedvirtual

◆ closeListFile()

virtual void FFaMsg::closeListFile ( )
inlinevirtual

Closes the list file.

◆ dialog() [1/3]

int FFaMsg::dialog ( const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts 
)
static

◆ dialog() [2/3]

int FFaMsg::dialog ( const std::string &  statusText,
const FFaDialogType  type = DISMISS_WARNING,
const char **  genericButtons = (const char**)NULL 
)
static

Shows a dialog according to the dialog type.

Returns
For the OK_CANCEL dialog: 1 for "Ok" and 0 for "Cancel".
For the YES_NO dialog: 1 for "Yes" and 0 for "No".
For the YES_NO_CANCEL dialog: 1, 0 and 2, respectively.
For a GENERIC dialog: The index of the pushed button (maximum 3).
For all other dialogs: Always 0.

◆ dialog() [3/3]

int FFaMsg::dialog ( int &  returnedSelectionIdx,
const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts,
const std::vector< std::string > &  selectionList 
)
static

◆ dialogVt() [1/3]

int FFaMsg::dialogVt ( const std::string &  message,
const FFaDialogType  type,
const char **  genericButtons 
)
protectedvirtual

◆ dialogVt() [2/3]

int FFaMsg::dialogVt ( const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts 
)
protectedvirtual

◆ dialogVt() [3/3]

int FFaMsg::dialogVt ( int &  returnedSelectionIdx,
const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts,
const std::vector< std::string > &  selectionList 
)
protectedvirtual

◆ disableProgress()

void FFaMsg::disableProgress ( )
static

◆ disableProgressVt()

virtual void FFaMsg::disableProgressVt ( )
inlineprotectedvirtual

◆ disableSubSteps()

void FFaMsg::disableSubSteps ( )
static

◆ disableSubStepsVt()

virtual void FFaMsg::disableSubStepsVt ( )
inlineprotectedvirtual

◆ displayTime()

void FFaMsg::displayTime ( int  hour,
int  min,
int  sec 
)
static

◆ displayTimeVt()

virtual void FFaMsg::displayTimeVt ( int  ,
int  ,
int   
)
inlineprotectedvirtual

◆ enableProgress()

void FFaMsg::enableProgress ( int  nSteps)
static

◆ enableProgressVt()

virtual void FFaMsg::enableProgressVt ( int  )
inlineprotectedvirtual

◆ enableSubSteps()

void FFaMsg::enableSubSteps ( int  steps)
static

◆ enableSubStepsVt()

virtual void FFaMsg::enableSubStepsVt ( int  )
inlineprotectedvirtual

◆ getMessager()

FFaMsg & FFaMsg::getMessager ( )
static

Returns the current messager object.

◆ list()

void FFaMsg::list ( const std::string &  str,
bool  onScreen = false 
)
static

◆ listVt()

void FFaMsg::listVt ( const std::string &  str,
bool  onScreen = false 
)
protectedvirtual

Reimplemented in F90Msg.

◆ openListFile()

virtual bool FFaMsg::openListFile ( const char *  = NULL,
bool  = false 
)
inlinevirtual

Opens a list file containing a copy of the output list window.

◆ popStatus()

void FFaMsg::popStatus ( )
static

◆ popStatusVt()

virtual void FFaMsg::popStatusVt ( )
inlineprotectedvirtual

◆ pushStatus()

void FFaMsg::pushStatus ( const std::string &  statusText)
static

◆ pushStatusVt()

virtual void FFaMsg::pushStatusVt ( const std::string &  )
inlineprotectedvirtual

◆ resetToAllAnswer()

void FFaMsg::resetToAllAnswer ( const FFaDialogType  type = _ALL_)
static

◆ setMessager()

void FFaMsg::setMessager ( FFaMsg messager = NULL)
static

Sets the real messager object to be used.

◆ setProgress()

void FFaMsg::setProgress ( int  progressStep)
static

◆ setProgressVt()

virtual void FFaMsg::setProgressVt ( int  )
inlineprotectedvirtual

◆ setStatus()

void FFaMsg::setStatus ( const std::string &  statusText)
static

◆ setStatusVt()

virtual void FFaMsg::setStatusVt ( const std::string &  )
inlineprotectedvirtual

◆ setSubStep()

void FFaMsg::setSubStep ( int  step)
static

◆ setSubStepVt()

virtual void FFaMsg::setSubStepVt ( int  )
inlineprotectedvirtual

◆ setSubTask()

void FFaMsg::setSubTask ( const std::string &  taskText)
static

◆ setSubTaskVt()

virtual void FFaMsg::setSubTaskVt ( const std::string &  )
inlineprotectedvirtual

◆ showStatus()

void FFaMsg::showStatus ( )
staticprotected

◆ tip()

void FFaMsg::tip ( const std::string &  str)
static

◆ tipVt()

void FFaMsg::tipVt ( const std::string &  str)
protectedvirtual

◆ usingDefault()

static bool FFaMsg::usingDefault ( )
inlinestatic

Returns true if we are using the default messager.

Friends And Related Function Documentation

◆ operator<< [1/8]

FFaMsg& operator<< ( FFaMsg messager,
char  c 
)
friend

◆ operator<< [2/8]

FFaMsg& operator<< ( FFaMsg messager,
const char *  str 
)
friend

◆ operator<< [3/8]

FFaMsg& operator<< ( FFaMsg messager,
const FaVec3 vec 
)
friend

◆ operator<< [4/8]

FFaMsg& operator<< ( FFaMsg messager,
const std::string &  str 
)
friend

◆ operator<< [5/8]

FFaMsg& operator<< ( FFaMsg messager,
double  d 
)
friend

◆ operator<< [6/8]

FFaMsg& operator<< ( FFaMsg messager,
int  i 
)
friend

◆ operator<< [7/8]

FFaMsg& operator<< ( FFaMsg messager,
long long int  i 
)
friend

◆ operator<< [8/8]

FFaMsg& operator<< ( FFaMsg messager,
size_t  i 
)
friend

Member Data Documentation

◆ ourCurrentMessager

FFaMsg * FFaMsg::ourCurrentMessager = NULL
staticprivate

◆ ourStatuses

std::stack< std::string > FFaMsg::ourStatuses
staticprotected

◆ ourToAllAnswer

std::map< FFaMsg::FFaDialogType, int > FFaMsg::ourToAllAnswer
staticprivate

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