// // This file is generated by fmtgen from "libaegis/fstate.def". // If you want to change the contents of this file // you need to edit libaegis/fstate.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_FSTATE_H #define LIBAEGIS_FSTATE_H #include #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 fingerprint_DEF #define fingerprint_DEF #define fingerprint_youngest_mask ((unsigned long)1 << 0) #define fingerprint_oldest_mask ((unsigned long)1 << 1) #define fingerprint_crypto_mask ((unsigned long)0) struct fingerprint_ty { long reference_count; unsigned long mask; string_ty *errpos; time_t youngest; time_t oldest; string_ty *crypto; }; #endif // fingerprint_DEF extern meta_type fingerprint_type; void fingerprint_write(const output::pointer &fp, const char *name, fingerprint_ty *value); void fingerprint_write_xml(const output::pointer &fp, const char *name, fingerprint_ty *value); fingerprint_ty *fingerprint_copy(fingerprint_ty *); fingerprint_ty *fingerprint_clone(fingerprint_ty *); #ifdef DEBUG void fingerprint_trace_real(const char *name, const fingerprint_ty *value); #define fingerprint_trace(x) ((void)(trace_pretest_ && (trace_where_, fingerprint_trace_real(trace_stringize(x), x), 0))) #else #define fingerprint_trace(x) #endif #ifndef fstate_src_architecture_times_DEF #define fstate_src_architecture_times_DEF #define fstate_src_architecture_times_variant_mask ((unsigned long)0) #define fstate_src_architecture_times_test_time_mask ((unsigned long)1 << 0) #define fstate_src_architecture_times_test_baseline_time_mask ((unsigned long)1 << 1) struct fstate_src_architecture_times_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *variant; time_t test_time; time_t test_baseline_time; }; #endif // fstate_src_architecture_times_DEF extern meta_type fstate_src_architecture_times_type; void fstate_src_architecture_times_write(const output::pointer &fp, const char *name, fstate_src_architecture_times_ty *value); void fstate_src_architecture_times_write_xml(const output::pointer &fp, const char *name, fstate_src_architecture_times_ty *value); fstate_src_architecture_times_ty *fstate_src_architecture_times_copy(fstate_src_architecture_times_ty *); fstate_src_architecture_times_ty *fstate_src_architecture_times_clone(fstate_src_architecture_times_ty *); #ifdef DEBUG void fstate_src_architecture_times_trace_real(const char *name, const fstate_src_architecture_times_ty *value); #define fstate_src_architecture_times_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_src_architecture_times_trace_real(trace_stringize(x), x), 0))) #else #define fstate_src_architecture_times_trace(x) #endif #ifndef fstate_src_architecture_times_list_DEF #define fstate_src_architecture_times_list_DEF struct fstate_src_architecture_times_list_ty { size_t length; size_t maximum; fstate_src_architecture_times_ty **list; }; #endif // fstate_src_architecture_times_list_DEF extern meta_type fstate_src_architecture_times_list_type; fstate_src_architecture_times_list_ty *fstate_src_architecture_times_list_copy(fstate_src_architecture_times_list_ty *); fstate_src_architecture_times_list_ty *fstate_src_architecture_times_list_clone(fstate_src_architecture_times_list_ty *); void fstate_src_architecture_times_list_write(const output::pointer &fp, const char *name, fstate_src_architecture_times_list_ty *value); void fstate_src_architecture_times_list_write_xml(const output::pointer &fp, const char *name, fstate_src_architecture_times_list_ty *value); #ifdef DEBUG void fstate_src_architecture_times_list_trace_real(const char *name, const fstate_src_architecture_times_list_ty *value); #define fstate_src_architecture_times_list_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_src_architecture_times_list_trace_real(trace_stringize(x), x), 0))) #else #define fstate_src_architecture_times_list_trace(x) #endif #ifndef fstate_src_test_list_DEF #define fstate_src_test_list_DEF struct fstate_src_test_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // fstate_src_test_list_DEF extern meta_type fstate_src_test_list_type; fstate_src_test_list_ty *fstate_src_test_list_copy(fstate_src_test_list_ty *); fstate_src_test_list_ty *fstate_src_test_list_clone(fstate_src_test_list_ty *); void fstate_src_test_list_write(const output::pointer &fp, const char *name, fstate_src_test_list_ty *value); void fstate_src_test_list_write_xml(const output::pointer &fp, const char *name, fstate_src_test_list_ty *value); #ifdef DEBUG void fstate_src_test_list_trace_real(const char *name, const fstate_src_test_list_ty *value); #define fstate_src_test_list_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_src_test_list_trace_real(trace_stringize(x), x), 0))) #else #define fstate_src_test_list_trace(x) #endif #ifndef fstate_src_DEF #define fstate_src_DEF #define fstate_src_file_name_mask ((unsigned long)0) #define fstate_src_uuid_mask ((unsigned long)0) #define fstate_src_action_mask ((unsigned long)1 << 0) #define fstate_src_edit_mask ((unsigned long)0) #define fstate_src_edit_number_mask ((unsigned long)0) #define fstate_src_edit_origin_mask ((unsigned long)0) #define fstate_src_edit_number_origin_mask ((unsigned long)0) #define fstate_src_edit_origin_new_mask ((unsigned long)0) #define fstate_src_edit_number_origin_new_mask ((unsigned long)0) #define fstate_src_usage_mask ((unsigned long)1 << 1) #define fstate_src_file_fp_mask ((unsigned long)0) #define fstate_src_diff_file_fp_mask ((unsigned long)0) #define fstate_src_idiff_file_fp_mask ((unsigned long)0) #define fstate_src_architecture_times_mask ((unsigned long)0) #define fstate_src_move_mask ((unsigned long)0) #define fstate_src_locked_by_mask ((unsigned long)1 << 2) #define fstate_src_about_to_be_created_by_mask ((unsigned long)1 << 3) #define fstate_src_about_to_be_copied_by_mask ((unsigned long)1 << 4) #define fstate_src_deleted_by_mask ((unsigned long)1 << 5) #define fstate_src_test_mask ((unsigned long)0) #define fstate_src_metrics_mask ((unsigned long)0) #define fstate_src_executable_mask ((unsigned long)1 << 6) #define fstate_src_attribute_mask ((unsigned long)0) struct fstate_src_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *file_name; string_ty *uuid; file_action_ty action; history_version_ty *edit; string_ty *edit_number; history_version_ty *edit_origin; string_ty *edit_number_origin; history_version_ty *edit_origin_new; string_ty *edit_number_origin_new; file_usage_ty usage; fingerprint_ty *file_fp; fingerprint_ty *diff_file_fp; fingerprint_ty *idiff_file_fp; fstate_src_architecture_times_list_ty *architecture_times; string_ty *move; long locked_by; long about_to_be_created_by; long about_to_be_copied_by; long deleted_by; fstate_src_test_list_ty *test; metric_list_ty *metrics; bool executable; attributes_list_ty *attribute; }; #endif // fstate_src_DEF extern meta_type fstate_src_type; void fstate_src_write(const output::pointer &fp, const char *name, fstate_src_ty *value); void fstate_src_write_xml(const output::pointer &fp, const char *name, fstate_src_ty *value); fstate_src_ty *fstate_src_copy(fstate_src_ty *); fstate_src_ty *fstate_src_clone(fstate_src_ty *); #ifdef DEBUG void fstate_src_trace_real(const char *name, const fstate_src_ty *value); #define fstate_src_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_src_trace_real(trace_stringize(x), x), 0))) #else #define fstate_src_trace(x) #endif #ifndef fstate_src_list_DEF #define fstate_src_list_DEF struct fstate_src_list_ty { size_t length; size_t maximum; fstate_src_ty **list; }; #endif // fstate_src_list_DEF extern meta_type fstate_src_list_type; fstate_src_list_ty *fstate_src_list_copy(fstate_src_list_ty *); fstate_src_list_ty *fstate_src_list_clone(fstate_src_list_ty *); void fstate_src_list_write(const output::pointer &fp, const char *name, fstate_src_list_ty *value); void fstate_src_list_write_xml(const output::pointer &fp, const char *name, fstate_src_list_ty *value); #ifdef DEBUG void fstate_src_list_trace_real(const char *name, const fstate_src_list_ty *value); #define fstate_src_list_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_src_list_trace_real(trace_stringize(x), x), 0))) #else #define fstate_src_list_trace(x) #endif #ifndef fstate_DEF #define fstate_DEF #define fstate_src_mask ((unsigned long)0) struct fstate_ty { long reference_count; unsigned long mask; string_ty *errpos; fstate_src_list_ty *src; }; #endif // fstate_DEF extern meta_type fstate_type; void fstate_write(const output::pointer &fp, fstate_ty *value); void fstate_write_xml(const output::pointer &fp, fstate_ty *value); fstate_ty *fstate_copy(fstate_ty *); fstate_ty *fstate_clone(fstate_ty *); #ifdef DEBUG void fstate_trace_real(const char *name, const fstate_ty *value); #define fstate_trace(x) ((void)(trace_pretest_ && (trace_where_, fstate_trace_real(trace_stringize(x), x), 0))) #else #define fstate_trace(x) #endif /** * The fstate_write_file function is used to * write fstate 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 fstate_write_file(string_ty *filename, fstate_ty *value, int comp); /** * The fstate_write_file function is used to * write fstate 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 fstate_write_file(const nstring &filnam, fstate_ty *value, bool comp); /** * The fstate_read_file function is used to * read fstate 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. */ fstate_ty *fstate_read_file(string_ty *filename); /** * The fstate_read_file function is used to * read fstate 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. */ fstate_ty *fstate_read_file(const nstring &filename); void fstate__rpt_init(void); #endif // LIBAEGIS_FSTATE_H