![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
gboolean commandLineExport (const gchar *filename
,GError **error
); void commandLineFree_all (void
); char * commandLineGet_ArgFilename (void
); char * commandLineGet_ArgSpinFileName (void
); char * commandLineGet_ExportFileName (void
); int commandLineGet_WithGtk (void
); void commandLineGet_XWindowGeometry (int *width
,int *height
); gchar * commandLineGet_bgImage (void
); GArray * commandLineGet_colorMinMax (void
); int * commandLineGet_coloredMap (void
); int * commandLineGet_colorizeColUsed (void
); gchar * commandLineGet_colorizeFileName (void
); #define commandLineGet_colorizePresetColor float * commandLineGet_extension (void
); gboolean commandLineGet_fitToBox (void
); guint commandLineGet_iSet (void
); gchar * commandLineGet_introspect (void
); float * commandLineGet_isoLinesColor (void
); gchar ** commandLineGet_isoNames (int *nb
); float * commandLineGet_isoValues (int *nb
); gchar * commandLineGet_isoVisuSurfacesFileName (void
); ToolMatrixScalingFlag commandLineGet_logScale (void
); float * commandLineGet_mapMinMax (void
); guint commandLineGet_mapPrecision (void
); guint commandLineGet_nIsoLines (void
); GHashTable * commandLineGet_options (void
); gchar * commandLineGet_planesFileName (void
); int commandLineGet_presetColor (void
); const gchar * commandLineGet_programName (void
); gchar * commandLineGet_resourcesFile (void
); gchar * commandLineGet_scalarFieldFileName (void
); int commandLineGet_scalingColumn (void
); gboolean commandLineGet_spinAndAtomic (void
); int commandLineGet_spinHidingMode (void
); float * commandLineGet_translation (void
); gchar * commandLineGet_valueFile (void
); gchar * commandLineGet_windowMode (void
); int commandLineParse (int argc
,char **argv
);
V_Sim parses the command line at startup and store data in private variables. All this values can be retrieve later by the program through calls to commandLineGet_* methods.
gboolean commandLineExport (const gchar *filename
,GError **error
);
Export the known command line options to an XML file.
|
a path to a filename to create ; |
|
a location to store a possible error. |
Returns : |
TRUE on success. |
Since 3.5
void commandLineFree_all (void
);
Release all allocated memory related to the command line options.
Since 3.5
char * commandLineGet_ArgFilename (void
);
This method retrieves the first argument. All other arguments are ignored.
Returns : |
the value of the first argument. |
char * commandLineGet_ArgSpinFileName (void
);
This method retrieves the second argument. All other arguments are ignored.
Returns : |
the value of the second argument. |
char * commandLineGet_ExportFileName (void
);
This method retrieves the value of the option --export or -e. This value must be a valid filename, with an extension known by V_Sim to do the export.
Returns : |
the value of the option --export. |
int commandLineGet_WithGtk (void
);
This method tells V_Sim is the GTK interface is needed or not.
Returns : |
1 if the interface is needed. |
void commandLineGet_XWindowGeometry (int *width
,int *height
);
This method retrieves the values of the option --geometry or -g. These values must be formatted with the following format : &dx&d and they give the size of the rendering window.
|
an integer to stores the desired width. |
|
an integer to stores the desired height. |
gchar * commandLineGet_bgImage (void
);
Retrieve if the filename to be loaded as a background image.
Returns : |
a string or NULL if option is not used. |
GArray * commandLineGet_colorMinMax (void
);
The external data file colourisation can be manually scaled.
Returns : |
the scaling values for manual scaling of external data values. |
Since 3.7
int * commandLineGet_coloredMap (void
);
One can pass options on the command line to create colored maps on planes.
Returns : |
an array of plane indexes to be maped, -1 terminated. |
Since 3.6
int * commandLineGet_colorizeColUsed (void
);
This method retrieves the value of the option --use-column or -u. This value consists of three integer values.
Returns : |
the three values of the option --use-column, or NULL if this option is not present. |
gchar * commandLineGet_colorizeFileName (void
);
This method retrieves the value of the option --colorize or -c. This value must be a valid filename. If this option is called, V_Sim actually enable the colorization, even if parameter file doesn't.
Returns : |
the value of the option --colorize. |
#define commandLineGet_colorizePresetColor() commandLineGet_presetColor();
DEPRECATED, use commandLineGet_presetColor()
instead.
Returns : |
the value of option --color-preset if set, -1 if not. |
float * commandLineGet_extension (void
);
This method retrieves the value of the option --expand or -x. This value consists of three floating values.
Returns : |
the three values of the option --expand. |
gboolean commandLineGet_fitToBox (void
);
This method gets if the surface should be adapted to the bounding box of the structure.
Returns : |
TRUE if the surface should be fitted. |
guint commandLineGet_iSet (void
);
Retrieve the desired id for multi dataset file to render.
Returns : |
0 as default value. |
Since 3.5
gchar * commandLineGet_introspect (void
);
Used only by introspection scanner.
Returns : |
the parameters of the introspection option. |
Since 3.6
float * commandLineGet_isoLinesColor (void
);
Retrieve the chosen colour for the iso-lines.
Returns : |
an array of three floats or NULL if the colour is auto. |
Since 3.5
gchar ** commandLineGet_isoNames (int *nb
);
This method retrieves the names associated to the values of the option --ios-values or -v.
It returns an array of size nb
, but not all element are set since names are not
mandatory. The nb
value is guarantied to by equal to the one returned by
commandLineGet_isoValues(void);
|
a location to store an integer. |
Returns : |
an array with the values of a size stored in nb . |
float * commandLineGet_isoValues (int *nb
);
This method retrieves the values of the option --ios-values or -v.
|
a location to store an integer. |
Returns : |
an array with the values of a size stored in nb . |
gchar * commandLineGet_isoVisuSurfacesFileName
(void
);
This method retrieves the filename given by the option --iso-surfaces or -i.
Returns : |
a filename, the string is owned by V_Sim. |
ToolMatrixScalingFlag commandLineGet_logScale (void
);
Retrieve if a log scale is required for various plots.
Returns : |
the logscale method. |
float * commandLineGet_mapMinMax (void
);
The coloured maps can be manually scaled.
Returns : |
the scaling values for manual scaling of coloured maps. |
Since 3.6
guint commandLineGet_mapPrecision (void
);
The coloured maps can be rendered with more or less accuracy.
Returns : |
the precision requested by the user. |
Since 3.6
guint commandLineGet_nIsoLines (void
);
Retrieve if the user asked for isolines on the coloured map (see
commandLineGet_coloredMap()
).
Returns : |
a positive number if some isolines are required, 0 if not. |
GHashTable * commandLineGet_options (void
);
This method gets the contents of all -o options. The value is first parsed as letters to check for a boolean value (F/T), then, a float is used and finally an integer. If nothing parsed, the option is dismissed.
Returns : |
a GHashTable pointer owned by V_Sim. |
gchar * commandLineGet_planesFileName (void
);
This method retrieves the value of the option --planes or -p. This value must be a valid filename.
Returns : |
the value of the option --planes. |
int commandLineGet_presetColor (void
);
This method returns the value of option --color-preset.
Returns : |
the value of option --color-preset if set, -1 if not. |
const gchar * commandLineGet_programName (void
);
Get argv[0].
Returns : |
the program name used to run V_Sim. |
Since 3.7
gchar * commandLineGet_resourcesFile (void
);
This method gets if a resources file has been given.
Returns : |
the name (owned by V_Sim) of the given resources file or NULL if none was present. |
gchar * commandLineGet_scalarFieldFileName (void
);
This method retrieves the filename given by the option --scalar-field or -f.
Returns : |
a filename, the string is owned by V_Sim. |
int commandLineGet_scalingColumn (void
);
Get the column used to scale nodes, if any given.
Returns : |
-1 if not provided, or a column id. |
Since 3.7
gboolean commandLineGet_spinAndAtomic (void
);
This method retrieves if the option --spin-and-atomic or -a has been set.
Returns : |
the TRUE if the option exists. |
int commandLineGet_spinHidingMode (void
);
This method retrieves if the option --hiding-mode or -m has been set.
Returns : |
the value of the option. |
float * commandLineGet_translation (void
);
This method retrieves the value of the option --translate or -t. This value consists of three floating values.
Returns : |
the three values of the option --translate. |
gchar * commandLineGet_valueFile (void
);
Retrieve the name of a possible value file, if any has been given.
Returns : |
a path (absolute) or NULL if the option has not been passed. Data are static. |
Since 3.5
gchar * commandLineGet_windowMode (void
);
Retrieve the windowing mode for V_Sim, 'classic' with the two rendering and command panel windows ; 'oneWindow' with a joined version of the two windows or 'renderOnly' with only the rendering window.
Returns : |
one of the three strings. |
Since 3.5
int commandLineParse (int argc
,char **argv
);
This method is called at startup to parse the command line and store all important information. If --help is given, or an unknown option, a little help is printed on the standard output.
|
the number of arguments. |
|
the values of all arguments. |
Returns : |
0 if everything goes well. |