1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Authors: Martin Trapp, Christian Schaefer,
7 ** entity.h: declarations for entity
16 /*******************************************************************/
18 /*******************************************************************/
20 /* initalize entity */
21 void init_entity (void);
24 /*******************************************************************/
26 /*******************************************************************/
28 typedef struct entity {
30 ident *name; /* name of this entity */
31 // type_class *owner; /* The class this entity belongs to */
32 type *owner; /* The class this entity belongs to */
33 ident *ld_name; /* Unique name of this entity, i.e., the mangled
34 name. E.g., for a class `A' with field `a' this
35 is the ident for `A_a'. */
36 type *type; /* The type of this entity, e.g., a method type, a
37 basic type of the language or a class itself */
38 unsigned long visit; /* visited counter for walks of the type information */
41 /* create a new entity */
42 entity *new_entity (/*type_class *owner,*/ type *owner,
43 ident *name, type *type);
45 /* manipulate fields of entity */
47 char *get_entity_name (entity *); */
48 ident *get_entity_ident (entity *);
50 void set_entity_ld_name (entity *, char *ld_name);
51 void set_entity_ld_ident (entity *, ident *ld_ident);
54 // type_class *get_entity_owner (entity *);
55 type *get_entity_owner (entity *);
56 // void set_entity_owner (entity *, union type *);
57 void set_entity_owner (entity *, type *);
58 inline void assert_legal_owner_of_ent(type *);
60 ident *get_entity_ld_name (entity *); /** resolve name conflict!! standard: ident **/
62 char *get_entity_ld_ident (entity *);
63 void set_entity_ld_name (entity *, char *ld_name);
64 void set_entity_ld_ident (entity *, ident *ld_ident);
67 type *get_entity_type (entity *);
68 void set_entity_type (entity *, type *);
70 # endif /* _ENTITY_H_ */