// // This file is generated by fmtgen from "libaegis/pstate.def". // If you want to change the contents of this file // you need to edit libaegis/pstate.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_PSTATE_H #define LIBAEGIS_PSTATE_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 pstate_copyright_years_list_DEF #define pstate_copyright_years_list_DEF struct pstate_copyright_years_list_ty { size_t length; size_t maximum; long *list; }; #endif // pstate_copyright_years_list_DEF extern meta_type pstate_copyright_years_list_type; pstate_copyright_years_list_ty *pstate_copyright_years_list_copy(pstate_copyright_years_list_ty *); pstate_copyright_years_list_ty *pstate_copyright_years_list_clone(pstate_copyright_years_list_ty *); void pstate_copyright_years_list_write(const output::pointer &fp, const char *name, pstate_copyright_years_list_ty *value); void pstate_copyright_years_list_write_xml(const output::pointer &fp, const char *name, pstate_copyright_years_list_ty *value); #ifdef DEBUG void pstate_copyright_years_list_trace_real(const char *name, const pstate_copyright_years_list_ty *value); #define pstate_copyright_years_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_copyright_years_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_copyright_years_list_trace(x) #endif #ifndef pstate_src_DEF #define pstate_src_DEF #define pstate_src_file_name_mask ((unsigned long)0) #define pstate_src_usage_mask ((unsigned long)1 << 0) #define pstate_src_edit_number_mask ((unsigned long)0) #define pstate_src_locked_by_mask ((unsigned long)1 << 1) #define pstate_src_about_to_be_created_by_mask ((unsigned long)1 << 2) #define pstate_src_deleted_by_mask ((unsigned long)1 << 3) struct pstate_src_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *file_name; file_usage_ty usage; string_ty *edit_number; long locked_by; long about_to_be_created_by; long deleted_by; }; #endif // pstate_src_DEF extern meta_type pstate_src_type; void pstate_src_write(const output::pointer &fp, const char *name, pstate_src_ty *value); void pstate_src_write_xml(const output::pointer &fp, const char *name, pstate_src_ty *value); pstate_src_ty *pstate_src_copy(pstate_src_ty *); pstate_src_ty *pstate_src_clone(pstate_src_ty *); #ifdef DEBUG void pstate_src_trace_real(const char *name, const pstate_src_ty *value); #define pstate_src_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_src_trace_real(trace_stringize(x), x), 0))) #else #define pstate_src_trace(x) #endif #ifndef pstate_src_list_DEF #define pstate_src_list_DEF struct pstate_src_list_ty { size_t length; size_t maximum; pstate_src_ty **list; }; #endif // pstate_src_list_DEF extern meta_type pstate_src_list_type; pstate_src_list_ty *pstate_src_list_copy(pstate_src_list_ty *); pstate_src_list_ty *pstate_src_list_clone(pstate_src_list_ty *); void pstate_src_list_write(const output::pointer &fp, const char *name, pstate_src_list_ty *value); void pstate_src_list_write_xml(const output::pointer &fp, const char *name, pstate_src_list_ty *value); #ifdef DEBUG void pstate_src_list_trace_real(const char *name, const pstate_src_list_ty *value); #define pstate_src_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_src_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_src_list_trace(x) #endif #ifndef pstate_history_name_list_DEF #define pstate_history_name_list_DEF struct pstate_history_name_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // pstate_history_name_list_DEF extern meta_type pstate_history_name_list_type; pstate_history_name_list_ty *pstate_history_name_list_copy(pstate_history_name_list_ty *); pstate_history_name_list_ty *pstate_history_name_list_clone(pstate_history_name_list_ty *); void pstate_history_name_list_write(const output::pointer &fp, const char *name, pstate_history_name_list_ty *value); void pstate_history_name_list_write_xml(const output::pointer &fp, const char *name, pstate_history_name_list_ty *value); #ifdef DEBUG void pstate_history_name_list_trace_real(const char *name, const pstate_history_name_list_ty *value); #define pstate_history_name_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_history_name_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_history_name_list_trace(x) #endif #ifndef pstate_history_DEF #define pstate_history_DEF #define pstate_history_delta_number_mask ((unsigned long)1 << 0) #define pstate_history_change_number_mask ((unsigned long)1 << 1) #define pstate_history_name_mask ((unsigned long)0) struct pstate_history_ty { long reference_count; unsigned long mask; string_ty *errpos; long delta_number; long change_number; pstate_history_name_list_ty *name; }; #endif // pstate_history_DEF extern meta_type pstate_history_type; void pstate_history_write(const output::pointer &fp, const char *name, pstate_history_ty *value); void pstate_history_write_xml(const output::pointer &fp, const char *name, pstate_history_ty *value); pstate_history_ty *pstate_history_copy(pstate_history_ty *); pstate_history_ty *pstate_history_clone(pstate_history_ty *); #ifdef DEBUG void pstate_history_trace_real(const char *name, const pstate_history_ty *value); #define pstate_history_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_history_trace_real(trace_stringize(x), x), 0))) #else #define pstate_history_trace(x) #endif #ifndef pstate_history_list_DEF #define pstate_history_list_DEF struct pstate_history_list_ty { size_t length; size_t maximum; pstate_history_ty **list; }; #endif // pstate_history_list_DEF extern meta_type pstate_history_list_type; pstate_history_list_ty *pstate_history_list_copy(pstate_history_list_ty *); pstate_history_list_ty *pstate_history_list_clone(pstate_history_list_ty *); void pstate_history_list_write(const output::pointer &fp, const char *name, pstate_history_list_ty *value); void pstate_history_list_write_xml(const output::pointer &fp, const char *name, pstate_history_list_ty *value); #ifdef DEBUG void pstate_history_list_trace_real(const char *name, const pstate_history_list_ty *value); #define pstate_history_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_history_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_history_list_trace(x) #endif #ifndef pstate_change_list_DEF #define pstate_change_list_DEF struct pstate_change_list_ty { size_t length; size_t maximum; long *list; }; #endif // pstate_change_list_DEF extern meta_type pstate_change_list_type; pstate_change_list_ty *pstate_change_list_copy(pstate_change_list_ty *); pstate_change_list_ty *pstate_change_list_clone(pstate_change_list_ty *); void pstate_change_list_write(const output::pointer &fp, const char *name, pstate_change_list_ty *value); void pstate_change_list_write_xml(const output::pointer &fp, const char *name, pstate_change_list_ty *value); #ifdef DEBUG void pstate_change_list_trace_real(const char *name, const pstate_change_list_ty *value); #define pstate_change_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_change_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_change_list_trace(x) #endif #ifndef pstate_administrator_list_DEF #define pstate_administrator_list_DEF struct pstate_administrator_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // pstate_administrator_list_DEF extern meta_type pstate_administrator_list_type; pstate_administrator_list_ty *pstate_administrator_list_copy(pstate_administrator_list_ty *); pstate_administrator_list_ty *pstate_administrator_list_clone(pstate_administrator_list_ty *); void pstate_administrator_list_write(const output::pointer &fp, const char *name, pstate_administrator_list_ty *value); void pstate_administrator_list_write_xml(const output::pointer &fp, const char *name, pstate_administrator_list_ty *value); #ifdef DEBUG void pstate_administrator_list_trace_real(const char *name, const pstate_administrator_list_ty *value); #define pstate_administrator_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_administrator_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_administrator_list_trace(x) #endif #ifndef pstate_developer_list_DEF #define pstate_developer_list_DEF struct pstate_developer_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // pstate_developer_list_DEF extern meta_type pstate_developer_list_type; pstate_developer_list_ty *pstate_developer_list_copy(pstate_developer_list_ty *); pstate_developer_list_ty *pstate_developer_list_clone(pstate_developer_list_ty *); void pstate_developer_list_write(const output::pointer &fp, const char *name, pstate_developer_list_ty *value); void pstate_developer_list_write_xml(const output::pointer &fp, const char *name, pstate_developer_list_ty *value); #ifdef DEBUG void pstate_developer_list_trace_real(const char *name, const pstate_developer_list_ty *value); #define pstate_developer_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_developer_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_developer_list_trace(x) #endif #ifndef pstate_reviewer_list_DEF #define pstate_reviewer_list_DEF struct pstate_reviewer_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // pstate_reviewer_list_DEF extern meta_type pstate_reviewer_list_type; pstate_reviewer_list_ty *pstate_reviewer_list_copy(pstate_reviewer_list_ty *); pstate_reviewer_list_ty *pstate_reviewer_list_clone(pstate_reviewer_list_ty *); void pstate_reviewer_list_write(const output::pointer &fp, const char *name, pstate_reviewer_list_ty *value); void pstate_reviewer_list_write_xml(const output::pointer &fp, const char *name, pstate_reviewer_list_ty *value); #ifdef DEBUG void pstate_reviewer_list_trace_real(const char *name, const pstate_reviewer_list_ty *value); #define pstate_reviewer_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_reviewer_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_reviewer_list_trace(x) #endif #ifndef pstate_integrator_list_DEF #define pstate_integrator_list_DEF struct pstate_integrator_list_ty { size_t length; size_t maximum; string_ty **list; }; #endif // pstate_integrator_list_DEF extern meta_type pstate_integrator_list_type; pstate_integrator_list_ty *pstate_integrator_list_copy(pstate_integrator_list_ty *); pstate_integrator_list_ty *pstate_integrator_list_clone(pstate_integrator_list_ty *); void pstate_integrator_list_write(const output::pointer &fp, const char *name, pstate_integrator_list_ty *value); void pstate_integrator_list_write_xml(const output::pointer &fp, const char *name, pstate_integrator_list_ty *value); #ifdef DEBUG void pstate_integrator_list_trace_real(const char *name, const pstate_integrator_list_ty *value); #define pstate_integrator_list_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_integrator_list_trace_real(trace_stringize(x), x), 0))) #else #define pstate_integrator_list_trace(x) #endif #ifndef pstate_DEF #define pstate_DEF #define pstate_next_test_number_mask ((unsigned long)1 << 0) #define pstate_umask_mask ((unsigned long)1 << 1) #define pstate_description_mask ((unsigned long)0) #define pstate_owner_name_mask ((unsigned long)0) #define pstate_group_name_mask ((unsigned long)0) #define pstate_developer_may_review_mask ((unsigned long)1 << 2) #define pstate_developer_may_integrate_mask ((unsigned long)1 << 3) #define pstate_reviewer_may_integrate_mask ((unsigned long)1 << 4) #define pstate_developers_may_create_changes_mask ((unsigned long)1 << 5) #define pstate_forced_develop_begin_notify_command_mask ((unsigned long)0) #define pstate_develop_end_notify_command_mask ((unsigned long)0) #define pstate_develop_end_undo_notify_command_mask ((unsigned long)0) #define pstate_review_pass_notify_command_mask ((unsigned long)0) #define pstate_review_pass_undo_notify_command_mask ((unsigned long)0) #define pstate_review_fail_notify_command_mask ((unsigned long)0) #define pstate_integrate_pass_notify_command_mask ((unsigned long)0) #define pstate_integrate_fail_notify_command_mask ((unsigned long)0) #define pstate_default_development_directory_mask ((unsigned long)0) #define pstate_default_test_exemption_mask ((unsigned long)1 << 6) #define pstate_copyright_years_mask ((unsigned long)0) #define pstate_next_change_number_mask ((unsigned long)1 << 7) #define pstate_next_delta_number_mask ((unsigned long)1 << 8) #define pstate_src_mask ((unsigned long)0) #define pstate_history_mask ((unsigned long)0) #define pstate_change_mask ((unsigned long)0) #define pstate_administrator_mask ((unsigned long)0) #define pstate_developer_mask ((unsigned long)0) #define pstate_reviewer_mask ((unsigned long)0) #define pstate_integrator_mask ((unsigned long)0) #define pstate_currently_integrating_change_mask ((unsigned long)1 << 9) #define pstate_version_major_mask ((unsigned long)1 << 10) #define pstate_version_minor_mask ((unsigned long)1 << 11) #define pstate_version_previous_mask ((unsigned long)0) struct pstate_ty { long reference_count; unsigned long mask; string_ty *errpos; long next_test_number; long umask; string_ty *description; string_ty *owner_name; string_ty *group_name; bool developer_may_review; bool developer_may_integrate; bool reviewer_may_integrate; bool developers_may_create_changes; string_ty *forced_develop_begin_notify_command; string_ty *develop_end_notify_command; string_ty *develop_end_undo_notify_command; string_ty *review_pass_notify_command; string_ty *review_pass_undo_notify_command; string_ty *review_fail_notify_command; string_ty *integrate_pass_notify_command; string_ty *integrate_fail_notify_command; string_ty *default_development_directory; bool default_test_exemption; pstate_copyright_years_list_ty *copyright_years; long next_change_number; long next_delta_number; pstate_src_list_ty *src; pstate_history_list_ty *history; pstate_change_list_ty *change; pstate_administrator_list_ty *administrator; pstate_developer_list_ty *developer; pstate_reviewer_list_ty *reviewer; pstate_integrator_list_ty *integrator; long currently_integrating_change; long version_major; long version_minor; string_ty *version_previous; }; #endif // pstate_DEF extern meta_type pstate_type; void pstate_write(const output::pointer &fp, pstate_ty *value); void pstate_write_xml(const output::pointer &fp, pstate_ty *value); pstate_ty *pstate_copy(pstate_ty *); pstate_ty *pstate_clone(pstate_ty *); #ifdef DEBUG void pstate_trace_real(const char *name, const pstate_ty *value); #define pstate_trace(x) ((void)(trace_pretest_ && (trace_where_, pstate_trace_real(trace_stringize(x), x), 0))) #else #define pstate_trace(x) #endif /** * The pstate_write_file function is used to * write pstate 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 pstate_write_file(string_ty *filename, pstate_ty *value, int comp); /** * The pstate_write_file function is used to * write pstate 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 pstate_write_file(const nstring &filnam, pstate_ty *value, bool comp); /** * The pstate_read_file function is used to * read pstate 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. */ pstate_ty *pstate_read_file(string_ty *filename); /** * The pstate_read_file function is used to * read pstate 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. */ pstate_ty *pstate_read_file(const nstring &filename); void pstate__rpt_init(void); #endif // LIBAEGIS_PSTATE_H