// // This file is generated by fmtgen from "libaegis/common.def". // If you want to change the contents of this file // you need to edit libaegis/common.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_COMMON_H #define LIBAEGIS_COMMON_H #include #include #include #include #include class nstring; // forward #ifndef change_cause_DEF #define change_cause_DEF enum change_cause_ty { change_cause_external_bug, change_cause_external_enhancement, change_cause_external_improvement, change_cause_internal_bug, change_cause_internal_enhancement, change_cause_internal_improvement, change_cause_chain }; #define change_cause_max 7 #endif // change_cause_DEF extern meta_type change_cause_type; void change_cause_write(const output::pointer &fp, const char *name, change_cause_ty value, bool show); void change_cause_write_xml(const output::pointer &fp, const char *name, change_cause_ty value, bool show); const char *change_cause_ename(change_cause_ty); #ifndef file_action_DEF #define file_action_DEF enum file_action_ty { file_action_create, file_action_modify, file_action_remove, file_action_insulate, file_action_transparent }; #define file_action_max 5 #endif // file_action_DEF extern meta_type file_action_type; void file_action_write(const output::pointer &fp, const char *name, file_action_ty value, bool show); void file_action_write_xml(const output::pointer &fp, const char *name, file_action_ty value, bool show); const char *file_action_ename(file_action_ty); #ifndef file_usage_DEF #define file_usage_DEF enum file_usage_ty { file_usage_source, file_usage_config, file_usage_build, file_usage_test, file_usage_manual_test }; #define file_usage_max 5 #endif // file_usage_DEF extern meta_type file_usage_type; void file_usage_write(const output::pointer &fp, const char *name, file_usage_ty value, bool show); void file_usage_write_xml(const output::pointer &fp, const char *name, file_usage_ty value, bool show); const char *file_usage_ename(file_usage_ty); #ifndef metric_DEF #define metric_DEF #define metric_name_mask ((unsigned long)0) #define metric_value_mask ((unsigned long)1 << 0) struct metric_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *name; double value; }; #endif // metric_DEF extern meta_type metric_type; void metric_write(const output::pointer &fp, const char *name, metric_ty *value); void metric_write_xml(const output::pointer &fp, const char *name, metric_ty *value); metric_ty *metric_copy(metric_ty *); metric_ty *metric_clone(metric_ty *); #ifdef DEBUG void metric_trace_real(const char *name, const metric_ty *value); #define metric_trace(x) ((void)(trace_pretest_ && (trace_where_, metric_trace_real(trace_stringize(x), x), 0))) #else #define metric_trace(x) #endif #ifndef metric_list_DEF #define metric_list_DEF struct metric_list_ty { size_t length; size_t maximum; metric_ty **list; }; #endif // metric_list_DEF extern meta_type metric_list_type; metric_list_ty *metric_list_copy(metric_list_ty *); metric_list_ty *metric_list_clone(metric_list_ty *); void metric_list_write(const output::pointer &fp, const char *name, metric_list_ty *value); void metric_list_write_xml(const output::pointer &fp, const char *name, metric_list_ty *value); #ifdef DEBUG void metric_list_trace_real(const char *name, const metric_list_ty *value); #define metric_list_trace(x) ((void)(trace_pretest_ && (trace_where_, metric_list_trace_real(trace_stringize(x), x), 0))) #else #define metric_list_trace(x) #endif #ifndef history_version_encoding_DEF #define history_version_encoding_DEF enum history_version_encoding_ty { history_version_encoding_none, history_version_encoding_quoted_printable, history_version_encoding_base64 }; #define history_version_encoding_max 3 #endif // history_version_encoding_DEF extern meta_type history_version_encoding_type; void history_version_encoding_write(const output::pointer &fp, const char *name, history_version_encoding_ty value, bool show); void history_version_encoding_write_xml(const output::pointer &fp, const char *name, history_version_encoding_ty value, bool show); const char *history_version_encoding_ename(history_version_encoding_ty); #ifndef history_version_DEF #define history_version_DEF #define history_version_revision_mask ((unsigned long)0) #define history_version_encoding_mask ((unsigned long)1 << 0) struct history_version_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *revision; history_version_encoding_ty encoding; }; #endif // history_version_DEF extern meta_type history_version_type; void history_version_write(const output::pointer &fp, const char *name, history_version_ty *value); void history_version_write_xml(const output::pointer &fp, const char *name, history_version_ty *value); history_version_ty *history_version_copy(history_version_ty *); history_version_ty *history_version_clone(history_version_ty *); #ifdef DEBUG void history_version_trace_real(const char *name, const history_version_ty *value); #define history_version_trace(x) ((void)(trace_pretest_ && (trace_where_, history_version_trace_real(trace_stringize(x), x), 0))) #else #define history_version_trace(x) #endif #ifndef attributes_DEF #define attributes_DEF #define attributes_name_mask ((unsigned long)0) #define attributes_value_mask ((unsigned long)0) struct attributes_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *name; string_ty *value; }; #endif // attributes_DEF extern meta_type attributes_type; void attributes_write(const output::pointer &fp, const char *name, attributes_ty *value); void attributes_write_xml(const output::pointer &fp, const char *name, attributes_ty *value); attributes_ty *attributes_copy(attributes_ty *); attributes_ty *attributes_clone(attributes_ty *); #ifdef DEBUG void attributes_trace_real(const char *name, const attributes_ty *value); #define attributes_trace(x) ((void)(trace_pretest_ && (trace_where_, attributes_trace_real(trace_stringize(x), x), 0))) #else #define attributes_trace(x) #endif #ifndef attributes_list_DEF #define attributes_list_DEF struct attributes_list_ty { size_t length; size_t maximum; attributes_ty **list; }; #endif // attributes_list_DEF extern meta_type attributes_list_type; attributes_list_ty *attributes_list_copy(attributes_list_ty *); attributes_list_ty *attributes_list_clone(attributes_list_ty *); void attributes_list_write(const output::pointer &fp, const char *name, attributes_list_ty *value); void attributes_list_write_xml(const output::pointer &fp, const char *name, attributes_list_ty *value); #ifdef DEBUG void attributes_list_trace_real(const char *name, const attributes_list_ty *value); #define attributes_list_trace(x) ((void)(trace_pretest_ && (trace_where_, attributes_list_trace_real(trace_stringize(x), x), 0))) #else #define attributes_list_trace(x) #endif #ifndef common_DEF #define common_DEF struct common_ty { long reference_count; unsigned long mask; string_ty *errpos; }; #endif // common_DEF extern meta_type common_type; void common_write(const output::pointer &fp, common_ty *value); void common_write_xml(const output::pointer &fp, common_ty *value); common_ty *common_copy(common_ty *); common_ty *common_clone(common_ty *); #ifdef DEBUG void common_trace_real(const char *name, const common_ty *value); #define common_trace(x) ((void)(trace_pretest_ && (trace_where_, common_trace_real(trace_stringize(x), x), 0))) #else #define common_trace(x) #endif /** * The common_write_file function is used to * write common 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 common_write_file(string_ty *filename, common_ty *value, int comp); /** * The common_write_file function is used to * write common 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 common_write_file(const nstring &filnam, common_ty *value, bool comp); /** * The common_read_file function is used to * read common 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. */ common_ty *common_read_file(string_ty *filename); /** * The common_read_file function is used to * read common 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. */ common_ty *common_read_file(const nstring &filename); void common__rpt_init(void); #endif // LIBAEGIS_COMMON_H