Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/pure-cfg/src/include/Diderot/options.h
ViewVC logotype

Annotation of /branches/pure-cfg/src/include/Diderot/options.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download) (as text)

1 : jhr 1237 /*! \file options.h
2 :     *
3 : glk 1252 * \author John Reppy, Gordon Kindlmann
4 : jhr 1237 */
5 :    
6 :     /*
7 : jhr 3349 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     *
9 :     * COPYRIGHT (c) 2015 The University of Chicago
10 : jhr 1237 * All rights reserved.
11 :     */
12 :    
13 :     #ifndef _DIDEROT_OPTIONS_H_
14 :     #define _DIDEROT_OPTIONS_H_
15 :    
16 : glk 1260 /*
17 :     ** "Options" refers to input variables or parameters to a Diderot program,
18 :     ** which have been called "options" based on the fact that the first means
19 :     ** of setting them is via command-line options.
20 :     */
21 :    
22 : jhr 1262 /*! \brief abstract struct for holding command-line options */
23 :     typedef struct Diderot_struct_options Diderot_Options_t;
24 : jhr 1237
25 : glk 1260 /* Command-line parsing implementation is in src/lib/common/input.c */
26 : jhr 1262 Diderot_Options_t *Diderot_OptNew ();
27 :     void Diderot_OptFree (Diderot_Options_t *dopts);
28 : jhr 1237
29 : jhr 1262 void Diderot_OptSetProgramInfo (Diderot_Options_t *dopts, const char *progInfo);
30 : jhr 1237
31 : jhr 1262 void Diderot_OptAddFlag (Diderot_Options_t *dopts, const char *name, const char *desc, bool *flg);
32 :     void Diderot_OptAddBool (Diderot_Options_t *dopts, const char *name, const char *desc, bool *v, bool hasDflt);
33 :     void Diderot_OptAddInt (Diderot_Options_t *dopts, const char *name, const char *desc, Diderot_int_t *v, bool hasDflt);
34 :     void Diderot_OptAddReal (Diderot_Options_t *dopts, const char *name, const char *desc, Diderot_real_t *v, bool hasDflt);
35 :     void Diderot_OptAddReal2 (Diderot_Options_t *dopts, const char *name, const char *desc, Diderot_vec2_t *v, bool hasDflt);
36 :     void Diderot_OptAddReal3 (Diderot_Options_t *dopts, const char *name, const char *desc, Diderot_vec3_t *v, bool hasDflt);
37 :     void Diderot_OptAddReal4 (Diderot_Options_t *dopts, const char *name, const char *desc, Diderot_vec4_t *v, bool hasDflt);
38 :     void Diderot_OptAddString (Diderot_Options_t *dopts, const char *name, const char *desc, char **v, bool hasDflt);
39 : glk 1252
40 : jhr 1262 void Diderot_OptProcess (Diderot_Options_t *dopts, int argc, const char **argv);
41 : glk 1252
42 : jhr 1262 //! function generated by compiler for registering the options used to initialize globals
43 :     void Diderot_RegisterGlobalOpts (Diderot_Options_t *dopts);
44 :    
45 : jhr 1649 // standard options
46 :     extern bool VerboseFlg; //! true if running in verbose mode
47 :     extern bool TimingFlg; //! true if timing computation
48 :     extern bool NrrdOutputFlg; //! true if output is in Nrrd format
49 :    
50 : jhr 1237 #endif /* !_DIDEROT_OPTIONS_H_ */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0