/[ascend]/trunk/base/generic/compiler/childdef.h
ViewVC logotype

Contents of /trunk/base/generic/compiler/childdef.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1066 - (show annotations) (download) (as text)
Sun Jan 7 10:02:41 2007 UTC (17 years, 8 months ago) by johnpye
File MIME type: text/x-chdr
File size: 3803 byte(s)
Adding doxygen 'addtogroup' for Solver, Compiler, Integrator.
1 /*
2 * Ascend Atom Child Definition Module
3 * by Benjamin A Allan
4 * Created: 11/20/96
5 * Version: $Revision: 1.4 $
6 * Version control file: $RCSfile: childdef.h,v $
7 * Date last modified: $Date: 1998/02/05 16:35:37 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1996 Benjamin Andrew Allan
13 *
14 * The Ascend Language Interpreter is free software; you can redistribute
15 * it and/or modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * The Ascend Language Interpreter is distributed in hope that it will be
20 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with the program; if not, write to the Free Software Foundation, Inc., 675
26 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
27 */
28
29 /** @file
30 * Ascend Atom Child Definition Module
31 * <pre>
32 * When #including typedef.h, make sure these files are #included first:
33 * #include "utilities/ascConfig.h"
34 * #include "fractions.h"
35 * #include "instance_enum.h"
36 * #include "compiler.h"
37 * #include "module.h"
38 * #include "list.h"
39 * #include "slist.h"
40 * #include "dimen.h"
41 * #include "child.h"
42 * #include "type_desc.h"
43 * </pre>
44 */
45
46 #ifndef ASC_CHILDDEF_H
47 #define ASC_CHILDDEF_H
48
49 /** addtogroup compiler Compiler
50 @{
51 */
52
53 /**
54 * There are 5 allowable ATOM children types, at present.
55 * The functions BaseType and GetTypeInfoFromISA rely on a table
56 * and the ordering within it. This is a hack to restrict the types
57 * allowed as ATOM children.
58 */
59 #define NUM_FUNDTYPES 5
60
61 extern int BaseType(symchar *name);
62 /**<
63 * <!-- int BaseType(name) -->
64 * <!-- symchar * name; -->
65 * Returns the number of the fundamental type, or -1 if not fundamental.
66 * The code here is *VERY* dependent upon the number and position
67 * of the FundamentalTypeList (internal to childdef.c)!
68 * Note that the fundamentalTypeList should be refilled with
69 * pointers from the symbol table and then comparisons done
70 * by ptr rather than strcmp. But that comes after we get a
71 * real symbol table.
72 */
73
74 extern struct ChildDesc *MakeChildDesc(symchar *name,
75 struct StatementList *sl,
76 ChildListPtr clist);
77 /**<
78 * <!-- struct ChildDesc *childd = MakeChildDesc(name,sl,clist); -->
79 * <!-- symchar *name; -->
80 * <!-- struct StatementList *sl; -->
81 * <!-- ChildListPtr clist; -->
82 * Returns the child description array based on legal statements in sl.
83 */
84
85 extern unsigned long CalcByteSize(enum type_kind t,
86 ChildListPtr clist,
87 struct ChildDesc *childd);
88 /**<
89 * <!-- len = CalcByteSize(t,clist,childd); -->
90 * <!-- enum type_kind t; -->
91 * <!-- ChildListPtr clist; -->
92 * <!-- struct ChildDesc *childd; -->
93 * <!-- unsigned long len; -->
94 * Calculates the byte size of an atomic instance given its
95 * child information
96 */
97
98 /* @} */
99
100 #endif /* ASC_CHILDDEF_H */
101

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22