source: trunk/FACT++/scripts/doc/_global_.js@ 18066

Last change on this file since 18066 was 15273, checked in by tbretz, 12 years ago
Added explanation for new magic variables.
File size: 4.4 KB
Line 
1throw new Error("Description for built in functions. Must not be included!");
2/***************************************************************************/
3/*** ***/
4/*** JsDoc: http://code.google.com/p/jsdoc-toolkit/w/list ***/
5/*** ***/
6/*** jsdoc -d=html/dimctrl scripts/doc/ ***/
7/*** ***/
8/***************************************************************************/
9/**
10 * @fileOverview
11 * Documentation of the native functions built into dimctrl's
12 * global namespace.
13 */
14
15/**
16 * An associative array containing the user supplied arguments identical to arg.
17 *
18 * @static
19 * @type Array
20 *
21 * @example
22 * var value = $['name'];
23 *
24 */
25_global_.$ = [];
26
27/**
28 * An associative array containing the user supplied arguments identical to $.
29 *
30 * @static
31 * @type Array
32 *
33 * @example
34 * for (var key in arg)
35 * console.out("arg["+key+"]="+arg[key]);
36 */
37_global_.arg = [];
38
39/**
40 * A magic variable which is always set to the filename of the
41 * JavaScript file currently executed, if any.
42 *
43 * @static
44 * @type String
45 *
46 * @example
47 * console.out(__FILE__);
48 */
49_global_.__FILE__ = filename;
50
51/**
52 * A magic variable which is always set to the modification time of the
53 * JavaScript file currently executed, if any.
54 *
55 * @static
56 * @type Date
57 *
58 * @example
59 * console.out(__DATE__);
60 */
61_global_.__DATE__ = filedate;
62
63/**
64 * A magic variable which is always set to the start time when the
65 * current JavaScript session was started.
66 *
67 * @static
68 * @constant
69 * @type Date
70 *
71 * @example
72 * console.out(__START__);
73 */
74_global_.__START__ = starttime;
75
76
77/**
78 * Includes another java script.
79 *
80 * Note that it is literally included,
81 * i.e. its code is executed as if it were at included at this
82 * place of the current file.
83 *
84 * @param {String} [name="test"]
85 * Name of the file to be included. The base directory is
86 * the directory in which dimctrl was started.
87 *
88 * @param {String} [. . . ]
89 * More files to be included
90 *
91 * @type Array
92 *
93 * @static
94 *
95 */
96_global_.include = function() { /* [native code] */ }
97
98/**
99 * Forecefully exit the current script. This function can be called
100 * from anywhere and will terminate the current script.
101 *
102 * The effect is the same than throwing a null expecption ("throw null;")
103 * in the main thread. In every other thread or callback, the whole script
104 * will terminate which is different from the behaviour of a null exception
105 * which only terminates the corresponding thread.
106 *
107 * @static
108 *
109 */
110_global_.exit = function() { /* [native code] */ }
111
112/**
113 *
114 * @returns {String}
115 * A string with the JavaScript V8 version is returned.
116 *
117 * @static
118 *
119 */
120_global_.version = function() { /* [native code] */ }
121
122/**
123 * Reads a file as a whole.
124 *
125 * Files can be split into an array when reading the file. It is
126 * important to note that no size check is done. So trying to read
127 * a file larger than the available memory will most probably crash
128 * the program. Strictly speaking only reading ascii fils make sense.
129 * Also gzip'ed files are supported.
130 *
131 * Note that this is only meant for debugging purpose and should
132 * not be usd in a production environment. Scripts should not
133 * access any files by defaults. If external values have to be
134 * provided arguments should be given to the script.
135 *
136 * @static
137 *
138 * @param {String} name
139 * Name of the file to read. The base directory is the current
140 * working directory
141 *
142 * @param {String} [delim=undefined]
143 * A delimiter used to split the file into an array. If provided
144 * it must be a String of length 1.
145 *
146 * @returns {String,Array[String]}
147 * If no delimiter is given, a StringObject with the file (read
148 * until \0) is returned. If a delimiter is given, an array
149 * of Strings is returned, one for each chunk. Both objects
150 * contain the property 'name' with the file name and the array
151 * contains the property 'delim' with the used delimiter.
152 *
153 * @throws
154 * <li> If number or type of arguments is wrong
155 * <li> If there was an error reading the file, the system error is thrown
156 *
157 * @example
158 * var string = File("fact++.rc");
159 * var array = File("fact++.rc", "\n");
160 */
161_global_.File = function() { /* [native code] */ }
Note: See TracBrowser for help on using the repository browser.