// // This file is generated by fmtgen from "libaegis/cattr.def". // If you want to change the contents of this file // you need to edit libaegis/cattr.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_CATTR_H #define LIBAEGIS_CATTR_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 cattr_architecture_list_DEF #define cattr_architecture_list_DEF struct cattr_architecture_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // cattr_architecture_list_DEF extern meta_type cattr_architecture_list_type; cattr_architecture_list_ty *cattr_architecture_list_copy(cattr_architecture_list_ty *); cattr_architecture_list_ty *cattr_architecture_list_clone(cattr_architecture_list_ty *); void cattr_architecture_list_write(const output::pointer &fp, const char *name, cattr_architecture_list_ty *value); void cattr_architecture_list_write_xml(const output::pointer &fp, const char *name, cattr_architecture_list_ty *value); #ifdef DEBUG void cattr_architecture_list_trace_real(const char *name, const cattr_architecture_list_ty *value); #define cattr_architecture_list_trace(x) ((void)(trace_pretest_ && (trace_where_, cattr_architecture_list_trace_real(trace_stringize(x), x), 0))) #else #define cattr_architecture_list_trace(x) #endif #ifndef cattr_copyright_years_list_DEF #define cattr_copyright_years_list_DEF struct cattr_copyright_years_list_ty { size_t length; size_t maximum; long *list; }; #endif // cattr_copyright_years_list_DEF extern meta_type cattr_copyright_years_list_type; cattr_copyright_years_list_ty *cattr_copyright_years_list_copy(cattr_copyright_years_list_ty *); cattr_copyright_years_list_ty *cattr_copyright_years_list_clone(cattr_copyright_years_list_ty *); void cattr_copyright_years_list_write(const output::pointer &fp, const char *name, cattr_copyright_years_list_ty *value); void cattr_copyright_years_list_write_xml(const output::pointer &fp, const char *name, cattr_copyright_years_list_ty *value); #ifdef DEBUG void cattr_copyright_years_list_trace_real(const char *name, const cattr_copyright_years_list_ty *value); #define cattr_copyright_years_list_trace(x) ((void)(trace_pretest_ && (trace_where_, cattr_copyright_years_list_trace_real(trace_stringize(x), x), 0))) #else #define cattr_copyright_years_list_trace(x) #endif #ifndef cattr_DEF #define cattr_DEF #define cattr_brief_description_mask ((unsigned long)0) #define cattr_description_mask ((unsigned long)0) #define cattr_cause_mask ((unsigned long)1 << 0) #define cattr_test_exempt_mask ((unsigned long)1 << 1) #define cattr_test_baseline_exempt_mask ((unsigned long)1 << 2) #define cattr_regression_test_exempt_mask ((unsigned long)1 << 3) #define cattr_architecture_mask ((unsigned long)0) #define cattr_copyright_years_mask ((unsigned long)0) #define cattr_version_previous_mask ((unsigned long)0) #define cattr_attribute_mask ((unsigned long)0) struct cattr_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *brief_description; string_ty *description; change_cause_ty cause; bool test_exempt; bool test_baseline_exempt; bool regression_test_exempt; cattr_architecture_list_ty *architecture; cattr_copyright_years_list_ty *copyright_years; string_ty *version_previous; attributes_list_ty *attribute; }; #endif // cattr_DEF extern meta_type cattr_type; void cattr_write(const output::pointer &fp, cattr_ty *value); void cattr_write_xml(const output::pointer &fp, cattr_ty *value); cattr_ty *cattr_copy(cattr_ty *); cattr_ty *cattr_clone(cattr_ty *); #ifdef DEBUG void cattr_trace_real(const char *name, const cattr_ty *value); #define cattr_trace(x) ((void)(trace_pretest_ && (trace_where_, cattr_trace_real(trace_stringize(x), x), 0))) #else #define cattr_trace(x) #endif /** * The cattr_write_file function is used to * write cattr 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 cattr_write_file(string_ty *filename, cattr_ty *value, int comp); /** * The cattr_write_file function is used to * write cattr 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 cattr_write_file(const nstring &filnam, cattr_ty *value, bool comp); /** * The cattr_read_file function is used to * read cattr 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. */ cattr_ty *cattr_read_file(string_ty *filename); /** * The cattr_read_file function is used to * read cattr 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. */ cattr_ty *cattr_read_file(const nstring &filename); void cattr__rpt_init(void); #endif // LIBAEGIS_CATTR_H