1 |
johnpye |
485 |
/* ASCEND modelling environment |
2 |
|
|
Copyright (C) 1998 Carnegie Mellon University |
3 |
|
|
Copyright (C) 2006 Carnegie Mellon University |
4 |
aw0a |
1 |
|
5 |
johnpye |
485 |
This program is free software; you can redistribute it and/or modify |
6 |
|
|
it under the terms of the GNU General Public License as published by |
7 |
|
|
the Free Software Foundation; either version 2, or (at your option) |
8 |
|
|
any later version. |
9 |
aw0a |
1 |
|
10 |
johnpye |
485 |
This program is distributed in the hope that it will be useful, |
11 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
|
GNU General Public License for more details. |
14 |
|
|
|
15 |
|
|
You should have received a copy of the GNU General Public License |
16 |
|
|
along with this program; if not, write to the Free Software |
17 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330, |
18 |
|
|
Boston, MA 02111-1307, USA. |
19 |
|
|
*//** @file |
20 |
|
|
This is a package of routines to process child list I/O. |
21 |
|
|
|
22 |
|
|
Requires: |
23 |
|
|
#include "utilities/ascConfig.h" |
24 |
|
|
#include "compiler.h" |
25 |
|
|
#include "list.h" |
26 |
|
|
#include "child.h" |
27 |
|
|
*//* |
28 |
|
|
by Ben Allan |
29 |
|
|
Version: $Revision: 1.3 $ |
30 |
|
|
Version control file: $RCSfile: childio.h,v $ |
31 |
|
|
Date last modified: $Date: 1998/06/11 17:36:23 $ |
32 |
|
|
Last modified by: $Author: ballan $ |
33 |
|
|
*/ |
34 |
|
|
|
35 |
johnpye |
480 |
#ifndef ASC_CHILDIO_H |
36 |
|
|
#define ASC_CHILDIO_H |
37 |
aw0a |
1 |
|
38 |
johnpye |
1066 |
/** addtogroup compiler Compiler |
39 |
|
|
@{ |
40 |
|
|
*/ |
41 |
|
|
|
42 |
johnpye |
485 |
#include <utilities/ascConfig.h> |
43 |
|
|
|
44 |
jds |
54 |
/* |
45 |
aw0a |
1 |
* WriteChildList(fp,cl) |
46 |
jds |
54 |
*/ |
47 |
|
|
/** |
48 |
aw0a |
1 |
* Write what is known at parse time about the children in the child list |
49 |
|
|
* given. What is known may be surprising. It may be only mildly |
50 |
|
|
* accurate. |
51 |
|
|
*/ |
52 |
jds |
54 |
extern void WriteChildList(FILE *fp, ChildListPtr cl); |
53 |
aw0a |
1 |
|
54 |
jds |
54 |
/** |
55 |
aw0a |
1 |
* Return a string containing buckets o'stuff about the nth child in list. |
56 |
|
|
* The string will make use of braces as necessary to delimit |
57 |
|
|
* items. What each item is will be subject to change according |
58 |
|
|
* to the meta-data given by WriteChildMetaDetails. |
59 |
jds |
54 |
* Items are booleans, integers or strings as explained below.<br><br> |
60 |
aw0a |
1 |
* |
61 |
|
|
* The string returned is the caller's responsibility. |
62 |
|
|
*/ |
63 |
johnpye |
1063 |
ASC_DLLSPEC char *WriteChildDetails(ChildListPtr cl, unsigned long n); |
64 |
aw0a |
1 |
|
65 |
jds |
54 |
/** |
66 |
aw0a |
1 |
* Returns a string with fields brace delimited. Each field |
67 |
|
|
* describes the corresponding field of a WriteChildDetails |
68 |
|
|
* return string. The ordering and size may be expected to shift as |
69 |
|
|
* ASCEND evolves. The hope is that the contents of metas individual |
70 |
|
|
* fields will shift much more slowly than the ordering, number of |
71 |
|
|
* fields and so forth. Using metas, one can expect to write code |
72 |
jds |
54 |
* which survives changes in plain s.<br><br> |
73 |
|
|
* |
74 |
aw0a |
1 |
* The returned string is NOT yours to free. (safe to keep, though). |
75 |
jds |
54 |
* The format is one or more elements in braces like: <br> |
76 |
|
|
* "{data} {data} {data}" <br> |
77 |
aw0a |
1 |
* where data is a triplet separated by - "name-ctype-{explanation}" |
78 |
|
|
* Name is a single string with no blanks, |
79 |
|
|
* ctype is boolean, integer, or string. |
80 |
|
|
* explanation is for human consumption and explains the field. |
81 |
|
|
*/ |
82 |
johnpye |
1063 |
ASC_DLLSPEC CONST char *WriteChildMetaDetails(void); |
83 |
aw0a |
1 |
|
84 |
jds |
54 |
/** |
85 |
|
|
* Issues a child missing error to file if the same childname/scope |
86 |
|
|
* has not been missing since the last call with any NULL argument. |
87 |
aw0a |
1 |
*/ |
88 |
johnpye |
1063 |
ASC_DLLSPEC void WriteChildMissing(FILE *fp, char *scope, symchar *childname); |
89 |
jds |
54 |
|
90 |
johnpye |
1066 |
/* @} */ |
91 |
|
|
|
92 |
johnpye |
480 |
#endif /* ASC_CHILDIO_H */ |
93 |
jds |
54 |
|