24#ifndef _GEMA_PRINT_UTILS_H_
25#define _GEMA_PRINT_UTILS_H_
85 : _logger(logger), _level(level), _options(opt), _firstGhostIndex(-1) {}
111 static QList<int> parseColumnWidths(lua_State* L,
int index,
QString fname,
int ncol);
112 static void parsePrintOptions(lua_State* L,
int index,
QString fname,
int& options,
int* state);
114 static QString leftStr (
QString str,
int width,
bool clip =
false);
115 static QString centerStr(
QString str,
int width,
bool clip =
false);
116 static QString rightStr (
QString str,
int width,
bool clip =
false);
119 static void progressBar(
int i,
int size,
int& mark,
const GmLogCategory& logger,
int freq = 10);
127 static void checkOption(
LuaTable& table,
const char* field,
int& options,
int flag);
The GmCellAccessor class is a proxy object to a value accesor implementing a more convenient interfac...
Definition gmCellAccessor.h:67
Base interface class for CellMesh type plugins.
Definition gmCellMesh.h:40
Base interface for FEM (finite element) meshes.
Definition gmElementMesh.h:42
The GmGaussAccessor class is a proxy object to a value accessor implementing a more convenient interf...
Definition gmGaussAccessor.h:39
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Partition-Color-Renumber object plugins.
Definition gmPCR.h:54
Groups utilitary routines for pretty printing data.
Definition gmPrintUtils.h:81
void setOptions(int options)
Sets all printing options.
Definition gmPrintUtils.h:91
QString center(QString val, int size)
Given a string, returns a new string with the given size, where val is centered on the available spac...
Definition gmPrintUtils.h:132
int _options
Print options, stores a bit field with PrintFlags options that are turned on.
Definition gmPrintUtils.h:136
int _firstGhostIndex
Index used by printValueTable() to identify which table lines, if any, refer to ghost nodes....
Definition gmPrintUtils.h:137
void setOption(GmPrintUtilsFlags opt, bool mode)
Enable or desable a printing option.
Definition gmPrintUtils.h:88
GmPrintUtils(const GmLogCategory &logger, GmLogLevel level=GM_EXT_INFO, int opt=GM_PRINT_DEFAULT)
Constructor receiving the logger and level used to print data, along with print options.
Definition gmPrintUtils.h:84
void setFirstGhostIndex(int index)
Informs the printer about the border between normal and ghost nodes.
Definition gmPrintUtils.h:99
const GmLogCategory & _logger
The logger used to print messages.
Definition gmPrintUtils.h:134
GmLogLevel _level
The log level used to print messages.
Definition gmPrintUtils.h:135
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition gmValueInfo.h:132
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of support functions and macros for information logging.
GmLogLevel
Available log levels list.
Definition gmLog.h:36
@ GM_EXT_INFO
Extended information. Probably more than you wanted.
Definition gmLog.h:38
GmPrintUtilsFlags
Set of combinable options controlling the behaviour of print functions.
Definition gmPrintUtils.h:43
@ GM_PRINT_TRAILLER
Should we add a closing trailler line to the table? Default = false.
Definition gmPrintUtils.h:59
@ GM_PRINT_UNITS
Should we print units in column title? Default = true.
Definition gmPrintUtils.h:44
@ GM_PRINT_MARK_GHOST_NODES
Should we mark line numbers (with a '|' prefix) in printValueTable() or cell node numbers in printCel...
Definition gmPrintUtils.h:57
@ GM_PRINT_CELL_ACTIVE
Should we add a column telling if the cell is active or not for cell meshes? Default = false.
Definition gmPrintUtils.h:54
@ GM_PRINT_LINE_NUMBERS
Should we print line numbers on the left margin? Default = true.
Definition gmPrintUtils.h:48
@ GM_PRINT_UNITS_ON_SECOND_LINE
Should we print units in the header in a separate line? Default = false.
Definition gmPrintUtils.h:45
@ GM_PRINT_HEADER_TITLE
Should we print a title in the header, for the entire table? Default = false.
Definition gmPrintUtils.h:58
@ GM_PRINT_CELL_PROPERTY_NAMES
Should we add a columns with property names for cell meshes? Default = true.
Definition gmPrintUtils.h:52
@ GM_PRINT_NODE_GEOMETRY
Should we print common geometry nodes? When false, filters rows in printValueTable() or cell nodes in...
Definition gmPrintUtils.h:55
@ GM_PRINT_INTERNAL_ORDER
Should we order the rows in the table according to the internal id (instead of the model id)?...
Definition gmPrintUtils.h:64
@ GM_PRINT_CELL_TYPE
Should we add a type column for cell meshes / Gauss attributes? Default = true.
Definition gmPrintUtils.h:50
@ GM_PRINT_CLIP_TITLES
Should we clip column titles when the user gave us a width and the title is bigger than that?...
Definition gmPrintUtils.h:49
@ GM_PRINT_CELL_EVAL_POINT
Should we add a evaluation point column when EVAL_FUNCTIONS = true for cell meshes or for Gauss Attri...
Definition gmPrintUtils.h:53
@ GM_PRINT_CELL_NODES
Should we add a node column for cell meshes? Default = true.
Definition gmPrintUtils.h:51
@ GM_PRINT_CONSTMAP
Should we try to translate values back to strings when a scalar data column has an associated const m...
Definition gmPrintUtils.h:61
@ GM_PRINT_DEF_AS_NIL
Should we print default values as 'nil'? Default = false.
Definition gmPrintUtils.h:47
@ GM_PRINT_NODE_GHOST
Should we print ghost nodes? When false, filters rows in printValueTable() or cell nodes in printCell...
Definition gmPrintUtils.h:56
@ GM_PRINT_ID
Should we add a node or cell Ids column? For node ids, ghost nodes are represented as negative number...
Definition gmPrintUtils.h:62
@ GM_PRINT_INTERNAL_ID
Should we add an internal (renumbered but 1-based) node/cell id column? For node ids,...
Definition gmPrintUtils.h:63
@ GM_PRINT_DEFAULT
A tag to request that the options should be filled with the default.
Definition gmPrintUtils.h:72
@ GM_PRINT_ACTIVEONLY
Should we print only active cells? Default = true.
Definition gmPrintUtils.h:60
@ GM_PRINT_EVAL_FUNCTIONS
Should we evaluate functions or do we print its name? Default = false.
Definition gmPrintUtils.h:46
@ GM_PRINT_USER
A mark to set the first 'user' option available. This value should be updated whenever adding options...
Definition gmPrintUtils.h:68