// // This file is generated by fmtgen from "libaegis/gstate.def". // If you want to change the contents of this file // you need to edit libaegis/gstate.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_GSTATE_H #define LIBAEGIS_GSTATE_H #include #include #include #include #include class nstring; // forward #ifndef gstate_where_DEF #define gstate_where_DEF #define gstate_where_project_name_mask ((unsigned long)0) #define gstate_where_directory_mask ((unsigned long)0) #define gstate_where_alias_for_mask ((unsigned long)0) struct gstate_where_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *project_name; string_ty *directory; string_ty *alias_for; }; #endif // gstate_where_DEF extern meta_type gstate_where_type; void gstate_where_write(const output::pointer &fp, const char *name, gstate_where_ty *value); void gstate_where_write_xml(const output::pointer &fp, const char *name, gstate_where_ty *value); gstate_where_ty *gstate_where_copy(gstate_where_ty *); gstate_where_ty *gstate_where_clone(gstate_where_ty *); #ifdef DEBUG void gstate_where_trace_real(const char *name, const gstate_where_ty *value); #define gstate_where_trace(x) ((void)(trace_pretest_ && (trace_where_, gstate_where_trace_real(trace_stringize(x), x), 0))) #else #define gstate_where_trace(x) #endif #ifndef gstate_where_list_DEF #define gstate_where_list_DEF struct gstate_where_list_ty { size_t length; size_t maximum; gstate_where_ty **list; }; #endif // gstate_where_list_DEF extern meta_type gstate_where_list_type; gstate_where_list_ty *gstate_where_list_copy(gstate_where_list_ty *); gstate_where_list_ty *gstate_where_list_clone(gstate_where_list_ty *); void gstate_where_list_write(const output::pointer &fp, const char *name, gstate_where_list_ty *value); void gstate_where_list_write_xml(const output::pointer &fp, const char *name, gstate_where_list_ty *value); #ifdef DEBUG void gstate_where_list_trace_real(const char *name, const gstate_where_list_ty *value); #define gstate_where_list_trace(x) ((void)(trace_pretest_ && (trace_where_, gstate_where_list_trace_real(trace_stringize(x), x), 0))) #else #define gstate_where_list_trace(x) #endif #ifndef gstate_DEF #define gstate_DEF #define gstate_where_mask ((unsigned long)0) struct gstate_ty { long reference_count; unsigned long mask; string_ty *errpos; gstate_where_list_ty *where; }; #endif // gstate_DEF extern meta_type gstate_type; void gstate_write(const output::pointer &fp, gstate_ty *value); void gstate_write_xml(const output::pointer &fp, gstate_ty *value); gstate_ty *gstate_copy(gstate_ty *); gstate_ty *gstate_clone(gstate_ty *); #ifdef DEBUG void gstate_trace_real(const char *name, const gstate_ty *value); #define gstate_trace(x) ((void)(trace_pretest_ && (trace_where_, gstate_trace_real(trace_stringize(x), x), 0))) #else #define gstate_trace(x) #endif /** * The gstate_write_file function is used to * write gstate meta data to the named file. * * @param filename * The name of the file to be written. * @param value * The value of the meta-data to be written. * @param comp * true (non-zero) if data should be compressed. * @note * If any errors are encountered, this * function will not return. All errors * will print a fatal error message, and * exit with an exit status of 1. */ void gstate_write_file(string_ty *filename, gstate_ty *value, int comp); /** * The gstate_write_file function is used to * write gstate meta data to the named file. * * @param filnam * The name of the file to be written. * @param value * The value of the meta-data to be written. * @param comp * true if data should be compressed. * @note * If any errors are encountered, this * function will not return. All errors * will print a fatal error message, and * exit with an exit status of 1. */ void gstate_write_file(const nstring &filnam, gstate_ty *value, bool comp); /** * The gstate_read_file function is used to * read gstate meta data from the named file. * * @param filename * The name of the file to be read. * @returns * a pointer to a dynamically allocated * value read from the file. * @note * If any errors are encountered, this * function will not return. All errors * (including syntax errors) will print a * fatal error message, and exit with an * exit status of 1. */ gstate_ty *gstate_read_file(string_ty *filename); /** * The gstate_read_file function is used to * read gstate meta data from the named file. * * @param filename * The name of the file to be read. * @returns * a pointer to a dynamically allocated * value read from the file. * @note * If any errors are encountered, this * function will not return. All errors * (including syntax errors) will print a * fatal error message, and exit with an * exit status of 1. */ gstate_ty *gstate_read_file(const nstring &filename); void gstate__rpt_init(void); #endif // LIBAEGIS_GSTATE_H