source: CIVL/examples/experimental/reverse_CIVL/ADFirstAidKit/treeverse.h

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 966 bytes
Line 
1#ifndef TREEVERSE_LOADED
2#define TREEVERSE_LOADED 1
3
4#define PUSHSNAP 1
5#define LOOKSNAP 2
6#define POPSNAP 3
7#define ADVANCE 4
8#define FIRSTTURN 5
9#define TURN 6
10
11/******************************* Exported Functions: */
12
13/** Initializes a (possibly nested) treeverse session for
14 * "length" steps using at most "nbSnap" snapshots.
15 * "firstStep' is the offset, i.e. the index of the 1st step. */
16extern void trv_init(int length, int nbSnap, int firstStep) ;
17
18/** Returns in *action the code for the next treeverse
19 * action to perform, and in *step the index of the step
20 * to which this action refers to. If no action is left,
21 * restores the stack to the enclosing treeverse session (if any).
22 * Returns 0 if some action is found, 0 otherwise. */
23extern int trv_next_action(int *action, int *step) ;
24
25/** Must be called when an "ADVANCE" order was issued,
26 * but then the iterative loop reaches past its exit point. */
27extern void trv_resize() ;
28
29#endif
Note: See TracBrowser for help on using the repository browser.