PIPS
property.h
Go to the documentation of this file.
1 #ifndef _newgen_property_included
2 #define _newgen_property_included
3 #define _gen_property_start 26
4 /*
5  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
6  *
7  * PLEASE DO NOT MODIFY IT.
8  */
9 
10 #define property_domain (_gen_property_start+0)
11 #if !defined(_newgen_property_domain_defined_)
12 #define _newgen_property_domain_defined_
13 #define PROPERTY_NEWGEN_DOMAIN (property_domain)
14 #define property_NEWGEN_DOMAIN (property_domain)
16 #endif /* _newgen_property_domain_defined_ */
17 
18 /* PROPERTY
19  */
20 #define PROPERTY(x) ((property)((x).p))
21 #define property_CAST(x) PROPERTY(x)
22 #define PROPERTY_CAST(x) PROPERTY(x)
23 #define PROPERTY_(x) ((x).e)
24 #define PROPERTY_TYPE property
25 #define property_TYPE property
26 #define property_undefined ((property)gen_chunk_undefined)
27 #define property_undefined_p(x) ((x)==property_undefined)
28 
29 extern property copy_property(property);
30 extern void free_property(property);
31 extern property check_property(property);
32 extern bool property_consistent_p(property);
33 extern bool property_defined_p(property);
34 #define gen_PROPERTY_cons gen_property_cons
38 extern void write_property(FILE*, property);
39 extern property read_property(FILE*);
44 };
45 extern string property_tag_as_string(enum property_utype);
46 extern property make_property(enum property_utype, void *);
47 extern property make_property_int(intptr_t);
48 extern property make_property_bool(bool);
49 extern property make_property_string(string);
50 
54  union {
55  intptr_t _property_int_; /* int:int */
56  gen_chunk _property_bool_; /* bool:bool */
57  string _property_string_; /* string:string */
59 };
60 
61 #define property_domain_number(x) ((x)->_type_)
62 #define property_tag(x) ((x)->_property_tag__)
63 #define property_int_p(x) (property_tag(x)==is_property_int)
64 #define property_int_(x) property_int(x) /* old hack compatible */
65 #define property_int(x) ((x)->_property_union_._property_int_)
66 #define property_bool_p(x) (property_tag(x)==is_property_bool)
67 #define property_bool_(x) property_bool(x) /* old hack compatible */
68 #define property_bool(x) ((x)->_property_union_._property_bool_.b)
69 #define property_string_p(x) (property_tag(x)==is_property_string)
70 #define property_string_(x) property_string(x) /* old hack compatible */
71 #define property_string(x) ((x)->_property_union_._property_string_)
72 
73 #define property_spec "\
74 --NEWGEN-START 26\n\
75 property = int:int + bool:bool + string:string;\n\
76 "
77 #endif
property make_property_bool(bool)
Definition: property.c:66
bool property_consistent_p(property)
Definition: property.c:25
property_utype
Definition: property.h:40
@ is_property_string
Definition: property.h:43
@ is_property_bool
Definition: property.h:42
@ is_property_int
Definition: property.h:41
property read_property(FILE *)
Definition: property.c:49
void free_property(property)
Definition: property.c:19
void property_assign_contents(property, property)
Definition: property.c:35
property copy_property(property)
PROPERTY.
Definition: property.c:16
property make_property(enum property_utype, void *)
Definition: property.c:60
property make_property_int(intptr_t)
Definition: property.c:63
struct _newgen_struct_property_ * property
Definition: property.h:15
list gen_property_cons(property, list)
Definition: property.c:32
property check_property(property)
Definition: property.c:22
string property_tag_as_string(enum property_utype)
Definition: property.c:52
void write_property(FILE *, property)
Definition: property.c:46
void property_non_recursive_free(property)
Definition: property.c:42
bool property_defined_p(property)
Definition: property.c:29
property make_property_string(string)
Definition: property.c:69
#define intptr_t
Definition: stdint.in.h:294
enum property_utype _property_tag__
Definition: property.h:53
union _newgen_struct_property_::@59 _property_union_
gen_chunk _property_bool_
int:int
Definition: property.h:56
string _property_string_
bool:bool
Definition: property.h:57
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
A gen_chunk is used to store every object.
Definition: genC.h:58