Some access routines for visited flags in entity.h, irnode.h,
[libfirm] / ir / ident / ident.h
1 /* Declarations for ident.
2    Copyright (C) 1995, 1996 Markus Armbruster */
3
4 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
5 ** All rights reserved.
6 **
7 ** Authors: Martin Trapp, Christian Schaefer
8 */
9
10 /* $Id$ */
11
12 # ifndef _IDENT_H_
13 # define _IDENT_H_
14
15 # include "assert.h"
16
17 /****h* libfirm/ident
18  *
19  * NAME
20  *   ident -- identifiers in the firm library
21  * NOTES
22  *  Identifiers are used in the firm library. This is the interface to it.
23  *
24  ******
25  */
26
27 /* Identifiers */
28 /****s* ident/ident
29  *
30  * NAME
31  *  ident - the abstract data type ident
32  * SOURCE
33  */
34 typedef const struct set_entry ident;
35 /*****/
36
37 /****f* ident/id_from_str
38  *
39  * NAME
40  *  id_from_str - store a string and create an ident
41  * SYNOPSIS
42  *  ident *id = id_from_str (char *str, int len);
43  * FUNCTION
44  *  Stores a string in the ident module and returns a handle for the string.
45  * INPUTS
46  *  str - the string (or whatever) which shall be stored
47  *  len - the length of the data in bytes
48  * RESULT
49  *  id - a handle for the generated ident
50  * SEE ALSO
51  *  id_to_str, id_to_strlen
52  ***
53  */
54 inline ident      *id_from_str (char *str, int len);
55
56 /****f* ident/id_to_str
57  *
58  * NAME
59  *  id_to_str - return a string represented by an ident
60  * SYNOPSIS
61  *  char *cp = id_to_str (ident *id);
62  * FUNCTION
63  *  Returns the string cp represented by id. This string cp is not
64  *  Null terminated!
65  * INPUTS
66  *  id - the ident
67  * RESULT
68  *  cp - a string
69  * SEE ALSO
70  *  id_from_str, id_to_strlen
71  ***
72  */
73 inline const char *id_to_str   (ident *id);
74
75 /****f* ident/id_to_strlen
76  *
77  * NAME
78  *  id_to_strlen - return the length of a string represented by an ident
79  * SYNOPSIS
80  *  int len = id_to_strlen (ident *id);
81  * FUNCTION
82  *  Returns the length of string represented by id.
83  * INPUTS
84  *  id - the ident
85  * RESULT
86  *  len - the length of the string
87  * SEE ALSO
88  *  id_from_str, id_to_str
89  ***
90  */
91 inline int         id_to_strlen(ident *id);
92
93 # endif /* _IDENT_H_ */