#include <laprefs.h>
Public Types | |
enum | pFormat { NORMAL, MATLAB, MAPLE } |
Static Public Member Functions | |
static void | setPrintFormat (pFormat p, bool newlines=true) |
static pFormat | getPrintFormat () |
static bool | getPrintNewLines () |
Class to store global (i.e. static i.e. library-wide) preferences.
Currently this only concerns the output display format of matrices. In the future, more preferences may or may not be added. In addition to this class, there is one more library-wide setting in LaException::enablePrint() but that concerns only the behaviour of exceptions and is therefore stored in that class.
static void LaPreferences::setPrintFormat | ( | pFormat | p, | |
bool | newlines = true | |||
) | [static] |
Set the output display format. The default is LaPreferences::NORMAL
.
The following is how one would modify the output display format to be compatible with their favourite math program:
Place
#include LA_PREFS_H
in the include statements, somewhere after "lafnames.h". At the beginning of your code, call e.g.
LaPreferences::setPrintFormat(LaPreferences::MATLAB, true);
where the first argument is your preferred output format, and the second argument toggles multiline matrix output (true
= place a newline after each matrix row, false
= use only the appropriate MATLAB/MAPLE delimiter). The second argument is ignored if the output format is LaPreferences::NORMAL
.
p | The preferred output format | |
newlines | Toggles multiline matrix output (true = place a newline after each matrix row, false = use only the appropriate MATLAB/MAPLE delimiter). This argument is ignored if the output format is LaPreferences::NORMAL . |
static pFormat LaPreferences::getPrintFormat | ( | ) | [static] |
Get the current output display format as set by setPrintFormat().
static bool LaPreferences::getPrintNewLines | ( | ) | [static] |
Get the current output display newline format as set by setPrintFormat().