source: CMT/v1r16p20040901/src/cmt_sequence.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 1.9 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// See the complete license in cmt_license.txt "http://www.cecill.info".
5//-----------------------------------------------------------
6
7#ifndef __cmt_sequence_h__
8#define __cmt_sequence_h__
9
10#include "cmt_awk.h"
11
12/**
13 *  This very simplified sequence interpreter is meant for
14 *  internal use only, for driving demo or test scenarios.
15 *   This is run as follows:
16 *
17 *      > cd ../demo
18 *      > cmt run_sequence xxx.cmt
19 *
20 *   where xxx.cmt is a text file containing descriptions of sequence steps:
21 *
22 *   sequence_step :
23 *       package-creation
24 *     | file-description
25 *     | package-access
26 *     | cmt-action
27 *     | comment
28 *
29 *   package-creation :
30 *       "%%package" <package-name> requirements-file
31 *
32 *          This creates a package from the current location, at version v1
33 *         structuration style is considered.
34 *          Requirements file follows the statement.
35 *
36 *   requirements-file :
37 *       file-contents
38 *
39 *   file-description :
40 *       "%%file" <file-path> file-contents
41 *
42 *           Create a files relatively to the last created package.
43 *
44 *   package-access :
45 *       "%%cdpackage" <package-name>
46 *
47 *           Move to the cmt directory of the specified package
48 *
49 *   cmt-action :
50 *       "%%cmt" <arguments>
51 *
52 *           Perform the specified cmt action.
53 *
54 *   file-contents :
55 *       line ...
56 *
57 *   comment :
58 *       %%% ...
59 *
60 */
61class SequenceRunner : public FAwk
62{
63public:
64
65  SequenceRunner ();
66  void begin ();
67  void filter (const cmt_string& line);
68  void end ();
69
70private:
71  bool started;
72  bool running;
73  cmt_string style;
74  cmt_string vdir;
75  cmt_string package;
76  cmt_string version;
77  cmt_string filename;
78  cmt_string buffer;
79  cmt_string pwd;
80};
81
82
83#endif
84
Note: See TracBrowser for help on using the repository browser.