![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
int parseCommandLine (int argc, char **argv); char* commandLineGet_ArgFilename (); char* commandLineGet_ExportFileName (); int commandLineGet_WithGtk (); void commandLineGet_XWindowGeometry (int *width, int *height); char* commandLineGet_ArgSpinFileName (); int commandLineGet_spinHidingMode (); gboolean commandLineGet_spinAndAtomic (); int* commandLineGet_colorizeColUsed (); gchar* commandLineGet_colorizeFileName (); float* commandLineGet_translation (); float* commandLineGet_extension (); #define commandLineGet_colorizePresetColor () gchar* commandLineGet_planesFileName (); gchar* commandLineGet_isoSurfacesFileName (); gboolean commandLineGet_fitToBox (); gchar* commandLineGet_resourcesFile (); gchar* commandLineGet_scalarFieldFileName (); float* commandLineGet_isoValues (int *nb); gchar** commandLineGet_isoNames (int *nb); gboolean commandLineGet_coloredMap (int *planeId); int commandLineGet_presetColor (); gchar* commandLineGet_bgImage (); OptionTable* commandLineGet_options (); gboolean commandLineGet_logScale (); guint commandLineGet_nIsoLines ();
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.
int parseCommandLine (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. |
char* commandLineGet_ArgFilename ();
This method retrieves the first argument. All other arguments are ignored.
Returns : |
the value of the first argument. |
char* commandLineGet_ExportFileName ();
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 ();
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. |
char* commandLineGet_ArgSpinFileName ();
This method retrieves the second argument. All other arguments are ignored.
Returns : |
the value of the second argument. |
int commandLineGet_spinHidingMode ();
This method retrieves if the option --hiding-mode or -m has been set.
Returns : |
the value of the option. |
gboolean commandLineGet_spinAndAtomic ();
This method retrieves if the option --spin-and-atomic or -a has been set.
Returns : |
the TRUE if the option exists. |
int* commandLineGet_colorizeColUsed ();
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 ();
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. |
float* commandLineGet_translation ();
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. |
float* commandLineGet_extension ();
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. |
#define commandLineGet_colorizePresetColor() commandLineGet_presetColor();
DEPRECATED, use commandLineGet_presetColor()
instead.
Returns : |
the value of option --color-preset if set, -1 if not. |
gchar* commandLineGet_planesFileName ();
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. |
gchar* commandLineGet_isoSurfacesFileName ();
This method retrieves the filename given by the option --iso-surfaces or -i.
Returns : |
a filename, the string is owned by V_Sim. |
gboolean commandLineGet_fitToBox ();
This method gets if the surface should be adapted to the bounding box of the structure.
Returns : |
TRUE if the surface should be fitted. |
gchar* commandLineGet_resourcesFile ();
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 ();
This method retrieves the filename given by the option --scalar-field or -f.
Returns : |
a filename, the string is owned by V_Sim. |
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_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()
;
|
a location to store an integer. |
Returns : |
an array with the values of a size stored in nb .
|
gboolean commandLineGet_coloredMap (int *planeId);
If the return value is TRUE, then the user requests a coloured map
using the given plane. The scalar field is given by
'--scalar-filed' option (see commandLineGet_scalarFieldFileName()
)
and the shade by '--color-preset' (see
commandLineGet_presetColor()
).
|
a location to store the plane to be used. |
Returns : |
TRUE if a coloured map is requested. |
int commandLineGet_presetColor ();
This method returns the value of option --color-preset.
Returns : |
the value of option --color-preset if set, -1 if not. |
gchar* commandLineGet_bgImage ();
Retrieve if the filename to be loaded as a background image.
Returns : |
a string or NULL if option is not used. |
OptionTable* commandLineGet_options ();
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 OptionTable pointer owned by V_Sim. |
gboolean commandLineGet_logScale ();
Retrieve if a log scale is required for various plots.
Returns : |
TRUE if '--log-scale' has been given, default is FALSE. |
guint commandLineGet_nIsoLines ();
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. |