1 |
/* ASCEND modelling environment |
2 |
Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly |
3 |
Copyright (C) 2006 Carnegie Mellon University |
4 |
|
5 |
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 |
|
10 |
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 |
*//** |
20 |
@file |
21 |
This module stores a copy of atom instances. |
22 |
|
23 |
Given the amount of time we spend looking for prototypes, we need |
24 |
to be running distinct prototype libraries for models, atoms, and |
25 |
possibly constants. |
26 |
|
27 |
Require: |
28 |
#include "utilities/ascConfig.h" |
29 |
#include"instance_enum.h" |
30 |
#include "compiler.h" |
31 |
*//* |
32 |
by Tom Epperly |
33 |
Version: $Revision: 1.7 $ |
34 |
Version control file: $RCSfile: prototype.h,v $ |
35 |
Date last modified: $Date: 1998/02/05 16:37:30 $ |
36 |
Last modified by: $Author: ballan $ |
37 |
*/ |
38 |
|
39 |
#ifndef ASC_PROTOTYPE_H |
40 |
#define ASC_PROTOTYPE_H |
41 |
|
42 |
/** addtogroup compiler Compiler |
43 |
@{ |
44 |
*/ |
45 |
|
46 |
#include <utilities/ascConfig.h> |
47 |
|
48 |
extern void InitializePrototype(void); |
49 |
/**< Must be called before any other prototype procedure. */ |
50 |
|
51 |
ASC_DLLSPEC struct Instance *LookupPrototype(symchar *t); |
52 |
/**< |
53 |
* Check if an instance of type "t" is in the prototype library. If |
54 |
* no instance of that type exists, NULL is returned. |
55 |
* t is from symbol table. |
56 |
*/ |
57 |
|
58 |
extern void DeletePrototype(symchar *t); |
59 |
/**< |
60 |
* Delete the type t from the prototype library. This should be done |
61 |
* when the definition of type "t" is changed or when the definition of |
62 |
* an ancestor of type "t" is change. |
63 |
*/ |
64 |
|
65 |
ASC_DLLSPEC void AddPrototype(struct Instance *i); |
66 |
/**< |
67 |
* This will add instance i to the prototype library. If another definition |
68 |
* of type "i" exists, it is deleted and replace with then new one. |
69 |
*/ |
70 |
|
71 |
ASC_DLLSPEC void DestroyPrototype(void); |
72 |
/**< |
73 |
* This deletes all the instances in the prototype library. This should |
74 |
* be done before the program exits. |
75 |
*/ |
76 |
|
77 |
/* @} */ |
78 |
|
79 |
#endif /* ASC_PROTOTYPE_H */ |
80 |
|