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 1260 - (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 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     * All rights reserved.
9 :     */
10 :    
11 :     #ifndef _DIDEROT_OPTIONS_H_
12 :     #define _DIDEROT_OPTIONS_H_
13 :    
14 : glk 1260 /*
15 :     ** "Options" refers to input variables or parameters to a Diderot program,
16 :     ** which have been called "options" based on the fact that the first means
17 :     ** of setting them is via command-line options.
18 :     */
19 :    
20 :     /*
21 :     ** Diderot_Options_t is an opaque pointer to a struct
22 :     ** Diderot_Options_s, which may be implemented in different ways,
23 :     ** depending on the runtime or the user interface
24 :     */
25 : glk 1252 typedef struct Diderot_Options_s *Diderot_Options_t;
26 : jhr 1237
27 : glk 1260 /* Command-line parsing implementation is in src/lib/common/input.c */
28 : glk 1252 Diderot_Options_t Diderot_Options_New ();
29 :     void Diderot_Options_Nix (Diderot_Options_t dopts);
30 : jhr 1237
31 : glk 1252 void Diderot_OptProgramInfoSet (Diderot_Options_t dopts, const char *progInfo);
32 : jhr 1237
33 : glk 1252 void Diderot_OptAddFlag (Diderot_Options_t dopts,
34 :     const char *name, const char *desc, bool *flg);
35 :     void Diderot_OptAddBool (Diderot_Options_t dopts,
36 :     const char *name, const char *desc, bool *v, bool hasDflt);
37 :     void Diderot_OptAddInt (Diderot_Options_t dopts,
38 :     const char *name, const char *desc, Diderot_int_t *v, bool hasDflt);
39 :     void Diderot_OptAddReal (Diderot_Options_t dopts,
40 :     const char *name, const char *desc, Diderot_real_t *v, bool hasDflt);
41 :     void Diderot_OptAddReal2 (Diderot_Options_t dopts,
42 :     const char *name, const char *desc, Diderot_vec2_t *v, bool hasDflt);
43 :     void Diderot_OptAddReal3 (Diderot_Options_t dopts,
44 :     const char *name, const char *desc, Diderot_vec3_t *v, bool hasDflt);
45 :     void Diderot_OptAddReal4 (Diderot_Options_t dopts,
46 :     const char *name, const char *desc, Diderot_vec4_t *v, bool hasDflt);
47 :     void Diderot_OptAddString (Diderot_Options_t dopts,
48 :     const char *name, const char *desc, char **v, bool hasDflt);
49 :    
50 :     void Diderot_ProcessOptions (Diderot_Options_t dopts, int argc, const char **argv);
51 :    
52 : jhr 1237 #endif /* !_DIDEROT_OPTIONS_H_ */

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