| 1 | throw 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 | /**
|
|---|
| 41 | * Includes another java script.
|
|---|
| 42 | *
|
|---|
| 43 | * Note that it is literally included,
|
|---|
| 44 | * i.e. its code is executed as if it were at included at this
|
|---|
| 45 | * place of the current file.
|
|---|
| 46 | *
|
|---|
| 47 | * @param {String} [name="test"]
|
|---|
| 48 | * Name of the file to be included. The base directory is
|
|---|
| 49 | * the directory in which dimctrl was started.
|
|---|
| 50 | *
|
|---|
| 51 | * @param {String} [. . . ]
|
|---|
| 52 | * More files to be included
|
|---|
| 53 | *
|
|---|
| 54 | * @type Array
|
|---|
| 55 | *
|
|---|
| 56 | * @static
|
|---|
| 57 | *
|
|---|
| 58 | */
|
|---|
| 59 | _global_.include = function() { /* [native code] */ }
|
|---|
| 60 |
|
|---|
| 61 | /**
|
|---|
| 62 | * Forecefully exit the current script. This function can be called
|
|---|
| 63 | * from anywhere and will terminate the current script.
|
|---|
| 64 | *
|
|---|
| 65 | * The effect is the same than throwing a null expecption ("throw null;")
|
|---|
| 66 | * in the main thread. In every other thread or callback, the whole script
|
|---|
| 67 | * will terminate which is different from the behaviour of a null exception
|
|---|
| 68 | * which only terminates the corresponding thread.
|
|---|
| 69 | *
|
|---|
| 70 | * @static
|
|---|
| 71 | *
|
|---|
| 72 | */
|
|---|
| 73 | _global_.exit = function() { /* [native code] */ }
|
|---|
| 74 |
|
|---|
| 75 | /**
|
|---|
| 76 | *
|
|---|
| 77 | * @returns {String}
|
|---|
| 78 | * A string with the JavaScript V8 version is returned.
|
|---|
| 79 | *
|
|---|
| 80 | * @static
|
|---|
| 81 | *
|
|---|
| 82 | */
|
|---|
| 83 | _global_.version = function() { /* [native code] */ }
|
|---|
| 84 |
|
|---|
| 85 | /**
|
|---|
| 86 | * Reads a file as a whole.
|
|---|
| 87 | *
|
|---|
| 88 | * Files can be split into an array when reading the file. It is
|
|---|
| 89 | * important to note that no size check is done. So trying to read
|
|---|
| 90 | * a file larger than the available memory will most probably crash
|
|---|
| 91 | * the program. Strictly speaking only reading ascii fils make sense.
|
|---|
| 92 | * Also gzip'ed files are supported.
|
|---|
| 93 | *
|
|---|
| 94 | * Note that this is only meant for debugging purpose and should
|
|---|
| 95 | * not be usd in a production environment. Scripts should not
|
|---|
| 96 | * access any files by defaults. If external values have to be
|
|---|
| 97 | * provided arguments should be given to the script.
|
|---|
| 98 | *
|
|---|
| 99 | * @static
|
|---|
| 100 | *
|
|---|
| 101 | * @param {String} name
|
|---|
| 102 | * Name of the file to read. The base directory is the current
|
|---|
| 103 | * working directory
|
|---|
| 104 | *
|
|---|
| 105 | * @param {String} [delim=undefined]
|
|---|
| 106 | * A delimiter used to split the file into an array. If provided
|
|---|
| 107 | * it must be a String of length 1.
|
|---|
| 108 | *
|
|---|
| 109 | * @returns {String,Array[String]}
|
|---|
| 110 | * If no delimiter is given, a StringObject with the file (read
|
|---|
| 111 | * until \0) is returned. If a delimiter is given, an array
|
|---|
| 112 | * of Strings is returned, one for each chunk. Both objects
|
|---|
| 113 | * contain the property 'name' with the file name and the array
|
|---|
| 114 | * contains the property 'delim' with the used delimiter.
|
|---|
| 115 | *
|
|---|
| 116 | * @throws
|
|---|
| 117 | * <li> If number or type of arguments is wrong
|
|---|
| 118 | * <li> If there was an error reading the file, the system error is thrown
|
|---|
| 119 | *
|
|---|
| 120 | * @example
|
|---|
| 121 | * var string = File("fact++.rc");
|
|---|
| 122 | * var array = File("fact++.rc", "\n");
|
|---|
| 123 | */
|
|---|
| 124 | _global_.File = function() { /* [native code] */ }
|
|---|