00001
00002
00003
00004
00005
00006
00007
00008 #ifndef LIBAEGIS_USTATE_H
00009 #define LIBAEGIS_USTATE_H
00010
00011 #include <common/str.h>
00012 #include <libaegis/output.h>
00013 #include <libaegis/meta_lex.h>
00014 #include <libaegis/meta_parse.h>
00015 #include <libaegis/meta_type.h>
00016
00017 class nstring;
00018
00019 #ifndef ustate_own_changes_list_DEF
00020 #define ustate_own_changes_list_DEF
00021 struct ustate_own_changes_list_ty
00022 {
00023 size_t length;
00024 size_t maximum;
00025 long *list;
00026 };
00027 #endif // ustate_own_changes_list_DEF
00028
00029 extern meta_type ustate_own_changes_list_type;
00030
00031 ustate_own_changes_list_ty *ustate_own_changes_list_copy(ustate_own_changes_list_ty *);
00032 ustate_own_changes_list_ty *ustate_own_changes_list_clone(ustate_own_changes_list_ty *);
00033 void ustate_own_changes_list_write(const output::pointer &fp, const char *name, ustate_own_changes_list_ty *value);
00034 void ustate_own_changes_list_write_xml(const output::pointer &fp, const char *name, ustate_own_changes_list_ty *value);
00035 #ifdef DEBUG
00036 void ustate_own_changes_list_trace_real(const char *name, const ustate_own_changes_list_ty *value);
00037 #define ustate_own_changes_list_trace(x) ((void)(trace_pretest_ && (trace_where_, ustate_own_changes_list_trace_real(trace_stringize(x), x), 0)))
00038 #else
00039 #define ustate_own_changes_list_trace(x)
00040 #endif
00041
00042 #ifndef ustate_own_DEF
00043 #define ustate_own_DEF
00044
00045 #define ustate_own_project_name_mask ((unsigned long)0)
00046 #define ustate_own_changes_mask ((unsigned long)0)
00047
00048 struct ustate_own_ty
00049 {
00050 long reference_count;
00051 unsigned long mask;
00052 string_ty *errpos;
00053 string_ty *project_name;
00054 ustate_own_changes_list_ty *changes;
00055 };
00056 #endif // ustate_own_DEF
00057
00058 extern meta_type ustate_own_type;
00059
00060 void ustate_own_write(const output::pointer &fp, const char *name, ustate_own_ty *value);
00061 void ustate_own_write_xml(const output::pointer &fp, const char *name, ustate_own_ty *value);
00062 ustate_own_ty *ustate_own_copy(ustate_own_ty *);
00063 ustate_own_ty *ustate_own_clone(ustate_own_ty *);
00064 #ifdef DEBUG
00065 void ustate_own_trace_real(const char *name, const ustate_own_ty *value);
00066 #define ustate_own_trace(x) ((void)(trace_pretest_ && (trace_where_, ustate_own_trace_real(trace_stringize(x), x), 0)))
00067 #else
00068 #define ustate_own_trace(x)
00069 #endif
00070
00071 #ifndef ustate_own_list_DEF
00072 #define ustate_own_list_DEF
00073 struct ustate_own_list_ty
00074 {
00075 size_t length;
00076 size_t maximum;
00077 ustate_own_ty **list;
00078 };
00079 #endif // ustate_own_list_DEF
00080
00081 extern meta_type ustate_own_list_type;
00082
00083 ustate_own_list_ty *ustate_own_list_copy(ustate_own_list_ty *);
00084 ustate_own_list_ty *ustate_own_list_clone(ustate_own_list_ty *);
00085 void ustate_own_list_write(const output::pointer &fp, const char *name, ustate_own_list_ty *value);
00086 void ustate_own_list_write_xml(const output::pointer &fp, const char *name, ustate_own_list_ty *value);
00087 #ifdef DEBUG
00088 void ustate_own_list_trace_real(const char *name, const ustate_own_list_ty *value);
00089 #define ustate_own_list_trace(x) ((void)(trace_pretest_ && (trace_where_, ustate_own_list_trace_real(trace_stringize(x), x), 0)))
00090 #else
00091 #define ustate_own_list_trace(x)
00092 #endif
00093
00094 #ifndef ustate_DEF
00095 #define ustate_DEF
00096
00097 #define ustate_own_mask ((unsigned long)0)
00098
00099 struct ustate_ty
00100 {
00101 long reference_count;
00102 unsigned long mask;
00103 string_ty *errpos;
00104 ustate_own_list_ty *own;
00105 };
00106 #endif // ustate_DEF
00107
00108 extern meta_type ustate_type;
00109
00110 void ustate_write(const output::pointer &fp, ustate_ty *value);
00111 void ustate_write_xml(const output::pointer &fp, ustate_ty *value);
00112 ustate_ty *ustate_copy(ustate_ty *);
00113 ustate_ty *ustate_clone(ustate_ty *);
00114 #ifdef DEBUG
00115 void ustate_trace_real(const char *name, const ustate_ty *value);
00116 #define ustate_trace(x) ((void)(trace_pretest_ && (trace_where_, ustate_trace_real(trace_stringize(x), x), 0)))
00117 #else
00118 #define ustate_trace(x)
00119 #endif
00120
00137 void ustate_write_file(string_ty *filename, ustate_ty *value, int comp);
00138
00155 void ustate_write_file(const nstring &filnam, ustate_ty *value, bool comp);
00156
00173 ustate_ty *ustate_read_file(string_ty *filename);
00174
00191 ustate_ty *ustate_read_file(const nstring &filename);
00192 void ustate__rpt_init(void);
00193
00194 #endif // LIBAEGIS_USTATE_H