Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / ParaView / vtkParseMain.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    vtkParseMain.h
5
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13
14 =========================================================================*/
15
16 /**
17  vtkParseMain.h provides argument parsing for the wrapper executables.
18
19  Usage: vtkWrap [options] infile ...
20
21  -D <macro[=def]>  add a macro definition
22  -U <macro>        cancel a macro definition
23  -I <dir>          add an include directory
24  -o <file>         specify the output file
25  @<file>           read arguments from a file
26  --help            print a help message and exit
27  --version         print the VTK version number and exit
28  --hints <file>    hints file
29  --types <file>    type hierarchy file
30
31  Notes:
32
33  1) The "-o" option is needed when there are multiple input files.
34     Otherwise, the output file can be given after the input file.
35
36  2) The "@file" option allows arguments to be stored in a file,
37     instead of given on the command line.  The use of such a file
38     is sometimes necessary to avoid overflowing the 8191-character
39     command-line limit on Windows.  If the file is not found, then
40     "@file" will be passed as as a command-line parameter.
41 */
42
43 #ifndef VTK_PARSE_MAIN_H
44 #define VTK_PARSE_MAIN_H
45
46 #include "vtkParseData.h"
47 #include <stdio.h>
48
49 /**
50  * Options for the wrappers
51  */
52 typedef struct _OptionInfo
53 {
54   int           NumberOfFiles;     /* the total number of file arguments */
55   char        **Files;             /* all of the file arguments */
56   char         *InputFileName;     /* the first file argument */
57   char         *OutputFileName;    /* the second file, or the "-o" file */
58   char         *HintFileName;      /* the file preceded by "--hints" */
59   char         *HierarchyFileName; /* the file preceded by "--types" */
60 } OptionInfo;
61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65
66 /**
67  * Return the options provided on the command line
68  */
69 OptionInfo *vtkParse_GetCommandLineOptions();
70
71 /**
72  * The main function, parses the file and returns the result.
73  */
74 FileInfo *vtkParse_Main(int argc, char *argv[]);
75
76 /**
77  * A main function that can take multiple input files.
78  * It does not parse the files.  It will exit on error.
79  */
80 void vtkParse_MainMulti(int argc, char *argv[]);
81
82 #ifdef __cplusplus
83 } /* extern "C" */
84 #endif
85
86 #endif