00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef ASC_CHILD_H
00039 #define ASC_CHILD_H
00040
00041 #include <utilities/ascConfig.h>
00042 #include <general/list.h>
00043 #include "compiler.h"
00044
00049 #include <utilities/ascConfig.h>
00050
00055 typedef CONST struct ChildListStructure *ChildListPtr;
00056
00065 struct ChildListEntry {
00066 symchar *strptr;
00068 CONST struct TypeDescription *typeptr;
00074 CONST struct Statement *statement;
00076 unsigned bflags;
00078 short isarray;
00083 short origin;
00094 #define origin_ERR 0
00095
00096 #define origin_ALI 1
00097 #define origin_ARR 2
00098 #define origin_ISA 3
00099 #define origin_WB 4
00100
00101 #define origin_PALI 5
00102 #define origin_PARR 6
00103 #define origin_PISA 7
00104 #define origin_PWB 8
00105 #define origin_EXT 9
00106 #define origin_PARAMETER_OFFSET (origin_PALI - origin_ALI)
00107
00113
00114 #define CBF_VISIBLE 0x1
00115 #define CBF_SUPPORTED 0x2
00116 #define CBF_PASSED 0x4
00120
00121 };
00122
00123 #define AliasingOrigin(ori) \
00124 ((ori) == origin_PALI || (ori) == origin_ALI || \
00125 (ori) == origin_PARR || (ori) == origin_ARR)
00126
00128 #define ParametricOrigin(ori) ((ori) >= origin_PALI && (ori) <= origin_PWB)
00129
00131 extern int CmpChildListEntries(CONST struct ChildListEntry *e1,
00132 CONST struct ChildListEntry *e2);
00139 extern ChildListPtr CreateChildList(struct gl_list_t *l);
00158 extern void DestroyChildList(ChildListPtr cl);
00167 extern ChildListPtr AppendChildList(ChildListPtr cl, struct gl_list_t *l);
00176 ASC_DLLSPEC unsigned long ChildListLen(ChildListPtr cl);
00181 ASC_DLLSPEC symchar *ChildStrPtr(ChildListPtr cl, unsigned long n);
00187 extern unsigned int ChildIsArray(ChildListPtr cl, unsigned long n);
00195 extern unsigned int ChildOrigin(ChildListPtr cl, unsigned long n);
00200 extern unsigned int ChildAliasing(ChildListPtr cl, unsigned long n);
00206 extern unsigned int ChildParametric(ChildListPtr cl, unsigned long n);
00213 extern CONST struct Statement *ChildStatement(ChildListPtr cl, unsigned long n);
00219 ASC_DLLSPEC unsigned ChildGetBooleans(ChildListPtr cl, unsigned long n);
00226 #define ChildVisible(cl,n) ((ChildGetBooleans((cl),(n)) & CBF_VISIBLE)!=0)
00227
00231 #define ChildSupported(cl,n) ((ChildGetBooleans((cl),(n)) & CBF_SUPPORTED)!=0)
00232
00236 #define ChildPassed(cl,n) ((ChildGetBooleans((cl),(n)) & CBF_PASSED) !=0)
00237
00241 ASC_DLLSPEC void ChildSetBoolean(ChildListPtr cl, unsigned long n,
00242 unsigned cbfname, unsigned val);
00250 #define ChildHide(cl,n) ChildSetBoolean((cl),(n),CBF_VISIBLE,0)
00251
00257 #define ChildShow(cl,n) ChildSetBoolean((cl),(n),CBF_VISIBLE,1)
00258
00264 extern CONST struct TypeDescription *ChildBaseTypePtr(ChildListPtr cl,
00265 unsigned long n);
00283 ASC_DLLSPEC unsigned long ChildPos(ChildListPtr cl, symchar *s);
00298 extern int CompareChildLists(ChildListPtr cl, ChildListPtr c2, unsigned long *diff);
00305 extern void WriteChildList(FILE *fp, ChildListPtr cl);
00312
00313
00314 #endif