NEST  2.6.0,not_revisioned_source_dir@0
slicontrol.h
Go to the documentation of this file.
1 /*
2  * slicontrol.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SLICONTROL_H
24 #define SLICONTROL_H
25 /*
26  SLI's control structures
27 */
28 #include "interpret.h"
29 #include "dictdatum.h"
30 
31 /**************************************
32  All SLI control functions are
33  defined in this module
34  *************************************/
35 
37 
39 {
40 public:
42  void execute(SLIInterpreter *) const;
43 };
44 
46 {
47 public:
49  void execute(SLIInterpreter *) const;
50 };
51 
53 {
54 public:
56  void execute(SLIInterpreter *) const;
57 };
58 
60 {
61 public:
63  void execute(SLIInterpreter *) const;
64 };
65 
67 {
68 public:
70  void execute(SLIInterpreter *) const;
71 };
72 
74 {
75 public:
77  void execute(SLIInterpreter *) const;
78 };
79 
81 {
82 public:
84  void execute(SLIInterpreter *) const;
85 };
86 
87 class IfFunction: public SLIFunction
88 {
89 public:
91  void execute(SLIInterpreter *) const;
92 };
93 
95 {
96 public:
98  void execute(SLIInterpreter *) const;
99 };
100 
102 {
103 public:
105  void execute(SLIInterpreter *) const;
106 };
107 
109 {
110  public:
112  void execute(SLIInterpreter *) const;
113 };
114 
116 {
117 public:
119  void execute(SLIInterpreter *) const;
120 };
121 
123 {
124 public:
126  void execute(SLIInterpreter *) const;
127 };
128 
130 {
131 public:
133  void execute(SLIInterpreter *) const;
134 };
135 
137 {
138 public:
140  void execute(SLIInterpreter *) const;
141 };
142 
144 {
145 public:
147  void execute(SLIInterpreter *) const;
148 };
149 
151 {
152 public:
154  void execute(SLIInterpreter *) const;
155 };
156 
158 {
159 public:
161  void execute(SLIInterpreter *) const;
162 };
163 
165 {
166 public:
168  void execute(SLIInterpreter *) const;
169 };
170 
172 {
173 public:
175  void execute(SLIInterpreter *) const;
176 };
177 
179 {
180 public:
182  void execute(SLIInterpreter *) const;
183 };
184 
186 {
187 public:
189  void execute(SLIInterpreter *) const;
190 };
191 
193 {
194 public:
196  void execute(SLIInterpreter *) const;
197 };
198 
200 {
201 public:
203  void execute(SLIInterpreter *) const;
204 };
205 
207 {
208 public:
210  void execute(SLIInterpreter *) const;
211 };
212 
213 
215 {
216 public:
218  void execute(SLIInterpreter *) const;
219 };
220 
222 {
223 public:
225  void execute(SLIInterpreter *) const;
226 };
227 
229 {
230 public:
232  void execute(SLIInterpreter *) const;
233 };
234 
236 {
237 public:
239  void execute(SLIInterpreter *) const;
240 };
241 
243 {
244 public:
246  void execute(SLIInterpreter *) const;
247 };
248 
250 {
251 public:
253  void execute(SLIInterpreter *) const;
254 };
255 
257 {
258 public:
260  void execute(SLIInterpreter *) const;
261 };
262 
264 {
265 public:
267  void execute(SLIInterpreter *) const;
268 };
269 
271 {
272 public:
274  void execute(SLIInterpreter *) const;
275 };
276 
278 {
279 public:
281  void execute(SLIInterpreter *) const;
282 };
283 
284 
286 {
287 public:
289  void execute(SLIInterpreter *) const;
290 };
291 
292 /* BeginDocumentation
293  Name: switch - finish a case ... switch structure
294  Synopsis: mark proc1...procn switch-> -
295  Description:
296  switch executes proc1 ... procn and removes the mark. If any executed
297  proc containes an exit command, switch will remove the other procs without
298  execution. switch is used together with case.
299  Parameters:
300  proc1...procn: executable procedure tokens.
301  Examples:
302 
303  mark
304  false {1 == exit} case
305  false {2 == exit} case
306  true {3 == exit} case
307  false {4 == exit} case
308  switch
309  --> 3
310 
311  mark {1 ==} {2 ==} switch --> 1 2
312 
313  Author: Gewaltig
314  FirstVersion: ??
315 
316  SeeAlso: case, switchdefault, exit, mark
317 */
318 
319 
321 {
322 public:
324  void execute(SLIInterpreter *) const;
325 };
326 
327 /* BeginDocumentation
328  Name: switchdefault - finish a case ... switchdefault structure
329  Synopsis: mark proc1...procn procdefault switchdefault -> -
330  Description:
331  Like switch, switchdefault executes any of proc1...procn.
332  If an execution it meets an exit command, no further procs are executed.
333  If n=0, e.g. no procedure other than procdefault is found, procdefault
334  will be executed. Thus, procdefault will be skipped if any other proc
335  exists.
336  Parameters:
337  proc1...procn: executable procedure tokens.
338  procdefault : execulable procedure called if no other proc is present.
339  Examples:
340 
341  mark
342  false {1 == exit} case
343  false {2 == exit} case
344  true {3 == exit} case
345  false {4 == exit} case
346  {(default) ==}
347  switchdefault
348  --> 3
349 
350  mark
351  false {1 == exit} case
352  false {2 == exit} case
353  false {3 == exit} case
354  false {4 == exit} case
355  {(default) ==}
356  switchdefault
357  --> default
358 
359  Author: Hehl
360  FirstVersion: April 16, 1999
361 
362  SeeAlso: case, switch, exit, mark
363 */
364 
366 {
367 public:
369  void execute(SLIInterpreter *) const;
370 };
371 
372 /* BeginDocumentation
373  Name: case - like if, but test a series of conditions.
374  Synopsis: bool proc case --> proc
375  -
376  Description:
377  case tests the bool and pushes proc if true, else does nothing.
378  Parameters:
379  bool : condition for case to test
380  proc : procedure to be executed if case is true
381  Examples:
382 
383  true {(hello) ==} case --> hello
384  false {(hello) ==} case --> -
385 
386  1 0 gt {(1 bigger than 0) ==} case --> 1 bigger than 0
387  1 0 lt {(0 bigger than 1) ==} case --> -
388 
389  mark
390  false {1 == exit} case
391  false {2 == exit} case
392  true {3 == exit} case
393  false {4 == exit} case
394  switch
395  --> 3
396 
397  Author: Gewaltig
398  FirstVersion: ??
399  Remarks: Use exit to make sure that switch is exited.
400  SeeAlso: switch, switchdefault, exit, mark, if
401 */
402 
404 {
405 public:
407  void execute(SLIInterpreter *) const;
408 };
409 
411 {
412 public:
414  void execute(SLIInterpreter *) const;
415 };
416 
418 {
419 public:
421  void execute(SLIInterpreter *) const;
422 };
423 
425 {
426 public:
428  void execute(SLIInterpreter *) const;
429 };
430 
432 {
433 public:
435  void execute(SLIInterpreter *) const;
436 
437 private:
438  bool getinfo_(int, DictionaryDatum&) const;
439 };
440 
442 {
443 public:
445  void execute(SLIInterpreter *) const;
446 };
447 
449 {
450 public:
452  void execute(SLIInterpreter *) const;
453 };
454 
456 {
457  public:
459  void execute(SLIInterpreter *) const;
460 };
461 
463 {
464 public:
466  void execute(SLIInterpreter *) const;
467 };
468 
470 {
471 public:
473  void execute(SLIInterpreter *) const;
474 };
475 
477 {
478 public:
480  void execute(SLIInterpreter *) const;
481 };
482 
484 {
485 public:
487  void execute(SLIInterpreter *) const;
488 };
489 
491 {
492 public:
494  void execute(SLIInterpreter *) const;
495 };
496 
498 {
499 public:
501  void execute(SLIInterpreter *) const;
502 };
503 
505 {
506 public:
508  void execute(SLIInterpreter *) const;
509 };
510 
512 {
513 public:
515  void execute(SLIInterpreter *) const;
516 };
517 
518 
520 {
521 public:
523  void execute(SLIInterpreter *) const;
524 };
525 
527 {
528 public:
530  void execute(SLIInterpreter *) const;
531 };
532 
534 {
535 public:
537  void execute(SLIInterpreter *) const;
538 };
539 
541 {
542 public:
544  void execute(SLIInterpreter *) const;
545 };
546 
547 
548 #endif
Definition: slicontrol.h:469
Definition: slicontrol.h:424
ExecFunction()
Definition: slicontrol.h:280
Definition: slicontrol.h:511
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1903
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1686
Definition: slicontrol.h:178
Backtrace_offFunction()
Definition: slicontrol.h:48
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:350
CounttomarkFunction()
Definition: slicontrol.h:413
Forall_aFunction()
Definition: slicontrol.h:202
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:154
Definition: slicontrol.h:277
PclocksFunction()
Definition: slicontrol.h:420
Definition: slicontrol.h:101
Definition: slicontrol.h:80
LoadFunction()
Definition: slicontrol.h:181
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:512
Token_sFunction()
Definition: slicontrol.h:465
Definition: slicontrol.h:164
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1488
Definition: slicontrol.h:540
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:377
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:101
DebugFunction()
Definition: slicontrol.h:543
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1112
RaiseagainFunction()
Definition: slicontrol.h:252
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1914
IparseFunction()
Definition: slicontrol.h:160
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1411
OStackdumpFunction()
Definition: slicontrol.h:55
Sleep_dFunction()
Definition: slicontrol.h:458
Definition: slifunction.h:35
RemoveGuardFunction()
Definition: slicontrol.h:493
StartFunction()
Definition: slicontrol.h:146
Definition: slicontrol.h:455
Definition: slicontrol.h:270
SetFunction()
Definition: slicontrol.h:174
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1851
TypeinfoFunction()
Definition: slicontrol.h:288
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1593
MessageFunction()
Definition: slicontrol.h:500
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1762
StopFunction()
Definition: slicontrol.h:125
Definition: slicontrol.h:410
IfFunction()
Definition: slicontrol.h:90
Definition: slicontrol.h:185
CloseinputFunction()
Definition: slicontrol.h:111
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:433
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1865
PclockspersecFunction()
Definition: slicontrol.h:427
Definition: slicontrol.h:403
Definition: slicontrol.h:206
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:107
Definition: slicontrol.h:235
Definition: slicontrol.h:52
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:648
Definition: slicontrol.h:171
Forall_iterFunction()
Definition: slicontrol.h:209
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1220
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1257
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:776
Definition: slicontrol.h:441
Forall_sFunction()
Definition: slicontrol.h:231
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:719
Definition: slicontrol.h:533
TimeFunction()
Definition: slicontrol.h:444
RepeatFunction()
Definition: slicontrol.h:104
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:993
SetGuardFunction()
Definition: slicontrol.h:486
Definition: slicontrol.h:249
Definition: slicontrol.h:285
Definition: slicontrol.h:365
CyclesFunction()
Definition: slicontrol.h:259
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1233
CaseFunction()
Definition: slicontrol.h:406
Definition: slicontrol.h:256
Definition: slicontrol.h:59
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:599
Definition: slicontrol.h:157
SetVerbosityFunction()
Definition: slicontrol.h:507
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:573
ForFunction()
Definition: slicontrol.h:195
Backtrace_onFunction()
Definition: slicontrol.h:41
DebugOnFunction()
Definition: slicontrol.h:529
Definition: slicontrol.h:417
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:881
Definition: slicontrol.h:192
Symbol_sFunction()
Definition: slicontrol.h:479
Definition: slicontrol.h:448
PgetrusageFunction()
Definition: slicontrol.h:434
Forallindexed_sFunction()
Definition: slicontrol.h:224
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:541
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1152
Definition: slicontrol.h:87
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1334
DebugOffFunction()
Definition: slicontrol.h:536
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:95
Definition: slicontrol.h:73
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1292
Definition: slicontrol.h:115
Definition: slicontrol.h:476
Definition: interpret.h:69
Forallindexed_aFunction()
Definition: slicontrol.h:217
CurrentnameFunction()
Definition: slicontrol.h:132
Definition: slicontrol.h:150
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:125
EStackdumpFunction()
Definition: slicontrol.h:62
NoopFunction()
Definition: slicontrol.h:522
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1736
Definition: slicontrol.h:242
CodeAccessedFunction()
Definition: slicontrol.h:266
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:966
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1880
Definition: slicontrol.h:320
SwitchdefaultFunction()
Definition: slicontrol.h:368
IfelseFunction()
Definition: slicontrol.h:97
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1896
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1160
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:292
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1453
Token_isFunction()
Definition: slicontrol.h:472
DefFunction()
Definition: slicontrol.h:167
Definition: slicontrol.h:108
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1364
Definition: slicontrol.h:214
Definition: slicontrol.h:431
Definition: slicontrol.h:143
ParsestdinFunction()
Definition: slicontrol.h:153
Definition: slicontrol.h:462
Definition: slicontrol.h:490
void init_slicontrol(SLIInterpreter *)
Definition: slicontrol.cc:2026
VerbosityFunction()
Definition: slicontrol.h:514
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:939
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1554
PrinterrorFunction()
Definition: slicontrol.h:245
CodeExecutedFunction()
Definition: slicontrol.h:273
SwitchFunction()
Definition: slicontrol.h:323
LoopFunction()
Definition: slicontrol.h:69
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:559
Definition: slicontrol.h:221
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:855
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:78
QuitFunction()
Definition: slicontrol.h:83
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1061
bool getinfo_(int, DictionaryDatum &) const
Definition: slicontrol.cc:1515
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1247
Definition: slicontrol.h:129
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:187
Definition: slicontrol.h:122
Definition: slicontrol.h:519
Definition: slicontrol.h:136
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1570
RaiseerrorFunction()
Definition: slicontrol.h:238
Definition: slicontrol.h:483
Definition: slicontrol.h:263
ExitFunction()
Definition: slicontrol.h:76
Definition: slicontrol.h:38
IparsestdinFunction()
Definition: slicontrol.h:139
Definition: slicontrol.h:526
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1655
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1142
LookupFunction()
Definition: slicontrol.h:188
StoppedFunction()
Definition: slicontrol.h:118
Sleep_iFunction()
Definition: slicontrol.h:451
Definition: slicontrol.h:497
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:233
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1818
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1619
Definition: slicontrol.h:66
Definition: slicontrol.h:94
Definition: slicontrol.h:504
Definition: slicontrol.h:199
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1168
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:1938
Definition: slicontrol.h:45
void execute(SLIInterpreter *) const
Definition: slicontrol.cc:681
Definition: slicontrol.h:228