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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations) (download) (as text)
Tue Aug 2 11:20:09 2005 UTC (14 years, 4 months ago) by jds
File MIME type: text/x-chdr
File size: 4356 byte(s)
Manual rework of doxygen comments in all headers.
- Added @file comment to all headers.
- Added parameter names to all function declarations in headers.
- Corrected comment referencing where necessary.
- Split some comments which documented blocks of declarations.
- Converted notes about required work into @todo comments so doxygen can generate a todo list.
Minor bug fixes.
1 /*
2 * Instance name routines
3 * by Tom Epperly
4 * Part Of Ascend
5 * Version: $Revision: 1.6 $
6 * Version control file: $RCSfile: instance_name.h,v $
7 * Date last modified: $Date: 1998/02/05 16:36:20 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly
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
25 * along with the program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27 * COPYING.
28 */
29
30 /** @file
31 * Instance name routines.
32 * <pre>
33 * When #including instance_name.h, make sure these files are #included first:
34 * #include "utilities/ascConfig.h"
35 * #include "compiler.h"
36 * </pre>
37 */
38
39 #ifndef __INSTANCE_NAME_H_SEEN__
40 #define __INSTANCE_NAME_H_SEEN__
41
42 enum NameTypes {
43 IntArrayIndex, /**< integer array index */
44 StrArrayIndex, /**< string array index */
45 StrName /**< string name */
46 };
47
48 union InstanceNameUnion {
49 long index;
50 symchar *name;
51 };
52
53 struct InstanceName {
54 enum NameTypes t;
55 union InstanceNameUnion u;
56 };
57
58 #define InstanceNameType(in) ((in).t)
59 /**<
60 * <!-- macro InstanceNameType(in) -->
61 * <!-- struct InstanceName in; -->
62 *
63 * Return the type of InstanceName structure in.
64 */
65
66 #define InstanceNameStr(in) ((in).u.name)
67 /**<
68 * <!-- macro InstanceNameStr(in) -->
69 * <!-- struct InstanceName in; -->
70 *
71 * Return the name of InstanceName structure in.
72 * in must be of type StrName.
73 */
74
75 #define InstanceIntIndex(in) ((in).u.index)
76 /**<
77 * <!-- macro InstanceIntIndex(in) -->
78 * <!-- struct InstanceName in; -->
79 *
80 * Return the integer index value of InstanceName structure in.
81 */
82
83 #define InstanceStrIndex(in) ((in).u.name)
84 /**<
85 * <!-- macro InstanceStrIndex(in) -->
86 * <!-- struct InstanceName in; -->
87 *
88 * Return the string index value of InstanceName structure in.
89 */
90
91 #define SetInstanceNameType(in,type) ((in).t) = (type)
92 /**<
93 * <!-- macro SetInstanceNameType(in,type) -->
94 * <!-- struct InstanceName in; -->
95 * <!-- enum NameTypes type; -->
96 *
97 * Set the type of InstanceName structure in to type (a NameTypes).
98 */
99
100 #define SetInstanceNameStrPtr(in,str) ((in).u.name) = (str)
101 /**<
102 * <!-- macro SetInstanceNameStrPtr(in,str) -->
103 * <!-- struct InstanceName in; -->
104 * <!-- symchar *str; -->
105 *
106 * Set the string pointer of InstanceName structure in to str (a symchar*).
107 */
108
109 #define SetInstanceNameStrIndex(in,str) ((in).u.name) = (str)
110 /**<
111 * <!-- macro SetInstanceNameStrIndex(in,str) -->
112 * <!-- struct InstanceName in; -->
113 * <!-- symchar *str; -->
114 *
115 * Set the string index of InstanceName structure in to str (a symchar*).
116 */
117
118 #define SetInstanceNameIntIndex(in,int_index) ((in).u.index) = (int_index)
119 /**<
120 * <!-- macro SetInstanceNameIndex(in,int_index) -->
121 * <!-- struct InstanceName in; -->
122 * <!-- long int_index; -->
123 *
124 * Set the integer index of InstanceName structure in to int_index (a long).
125 */
126
127 #endif /* __INSTANCE_NAME_H_SEEN__ */
128

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