diff --git a/ds_files/ds_types.anubis b/ds_files/ds_types.anubis index 5422223..466de24 100644 --- a/ds_files/ds_types.anubis +++ b/ds_files/ds_types.anubis @@ -12,277 +12,288 @@ read densaku_lib/types/densaku.anubis define String model_types = "hayamiki_lib/model/types/". define String view_types = "hayamiki_lib/view/types/". -public define List(DS_Type) hayamiki_lib_types_description = +public define List(DS_Type_File) hayamiki_lib_types_description = [ - ds_type("HK_Database", [ - alternative("hk_database", [ - component(string, "name", comment("name of the database")), - component(list, extern_type("HK_App", model_types+"hk_app.anubis"), "apps", comment("list of applications")) - ]) - ]), - - ds_type("HK_App", [ - alternative("hk_app", [ - component(string, "app_name"), - component(extern_type("HK_Icon", model_types+"hk_icon.anubis"), "icon"), - component(extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help"), - component(list, extern_type("HK_Table", model_types+"hk_table.anubis"), "hk_tables") - ]) - ]), - - ds_type("HK_Icon", [ - enum("no_icon"), - alternative("icon16", [ - component(string, "name") - ]) - ]), - - ds_type("HK_Help_Text", [ - enum("no_help_text", comment("no help text available")), - alternative("help_text_TAG", [ - component(string, "h_text_tag", comment("TAG use with Anubis translation tool /locale/L3.anubis")) + ds_type_file(auto, auto, + [ + ds_type("HK_Database", [ + alternative("hk_database", [ + component(string, "name", comment("name of the database")), + component(list, extern_type("HK_App", model_types+"hk_app.anubis"), "apps", comment("list of applications")) + ]) + ]), + + ds_type("HK_App", [ + alternative("hk_app", [ + component(string, "app_name"), + component(extern_type("HK_Icon", model_types+"hk_icon.anubis"), "icon"), + component(extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help"), + component(list, extern_type("HK_Table", model_types+"hk_table.anubis"), "hk_tables") + ]) ]), - alternative("help_text", [ - component(string, "h_text", comment("pure text to show")) - ]) - ]), - ds_type("HK_Table", [ - alternative("hk_table", [ - component(string, "name", comment("name of the table")), - component(string, "short_name", comment("table name without app_name in prefix")), - component(extern_type("HK_Model", model_types+"hk_model.anubis"), "model"), - component(extern_type("HK_Display", view_types+ "hk_display.anubis"), "display") - ]) - ]), - - ds_type("HK_Model", [ - alternative("hk_model", [ - component(list, extern_type("HK_Model_Column", model_types+"hk_model_column.anubis"), "columns", comment("columns other than the primary key column (if any)")), - component(string, "show_string") - ]) - ]), - - ds_type("HK_Model_Column", [ - alternative("hk_column", [ - component( string, "name", comment("name of ordinary column (i.e. all but 'id')")), - component( extern_type("HK_Model_Field", model_types+"hk_model_field.anubis"), "type"), - component(list, extern_type("HK_Model_Attr", model_types+"hk_model_attr.anubis"), "attributes"), - component( extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help") - ]) - ]), - - ds_type("HK_Model_Field", [ - enum("p_key"), - enum("boolean_field", comment("true or false")), - alternative("date_field", [ - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("date with the precision of the day")), + ds_type("HK_Icon", [ + enum("no_icon"), + alternative("icon16", [ + component(string, "name") + ]) ]), - alternative("time_field", [ - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("time with the precision of the second")), + + ds_type("HK_Help_Text", [ + enum("no_help_text", comment("no help text available")), + alternative("help_text_TAG", [ + component(string, "h_text_tag", comment("TAG use with Anubis translation tool /locale/L3.anubis")) + ]), + alternative("help_text", [ + component(string, "h_text", comment("pure text to show")) + ]) ]), - alternative("datetime_field", [ - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("datetime with the precision of the second")), + + ds_type("HK_Table", [ + alternative("hk_table", [ + component(string, "name", comment("name of the table")), + component(string, "short_name", comment("table name without app_name in prefix")), + component(extern_type("HK_Model", model_types+"hk_model.anubis"), "model"), + component(extern_type("HK_Display", view_types+ "hk_display.anubis"), "display") + ]) ]), - alternative("foreign_key", comment("foreign key to 'id' in another (or same) table and column_name for choice selector)"), - [ - component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"), - component(string, "table_name"), - //component(extern_type("HK_FK_Attr", model_types+"hk_fk_attr.anubis"), "fk_attr"), + + ds_type("HK_Model", [ + alternative("hk_model", [ + component(list, extern_type("HK_Model_Column", model_types+"hk_model_column.anubis"), "columns", comment("columns other than the primary key column (if any)")), + component(string, "show_string") + ]) ]), - alternative("integer_field", [ - component(extern_type("HK_Int_Choices", model_types+"hk_int_choices.anubis"), "choices", comment("integer of arbitrary size ")), + + ds_type("HK_Model_Column", [ + alternative("hk_column", [ + component( string, "name", comment("name of ordinary column (i.e. all but 'id')")), + component( extern_type("HK_Model_Field", model_types+"hk_model_field.anubis"), "type"), + component(list, extern_type("HK_Model_Attr", model_types+"hk_model_attr.anubis"), "attributes"), + component( extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help") + ]) ]), - enum("float_field"), - alternative("char_field", [ - component(extern_type("HK_Text_Choices", model_types+"hk_text_choices.anubis"), "choices"), - component(int, "size", comment("text of maximal size 'size' (number of characters)")), + + ds_type("HK_Model_Field", [ + enum("p_key"), + enum("boolean_field", comment("true or false")), + alternative("date_field", [ + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("date with the precision of the day")), + ]), + alternative("time_field", [ + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("time with the precision of the second")), + ]), + alternative("datetime_field", [ + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("datetime with the precision of the second")), + ]), + alternative("foreign_key", comment("foreign key to 'id' in another (or same) table and column_name for choice selector)"), + [ + component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"), + component(string, "table_name"), + //component(extern_type("HK_FK_Attr", model_types+"hk_fk_attr.anubis"), "fk_attr"), + ]), + alternative("integer_field", [ + component(extern_type("HK_Int_Choices", model_types+"hk_int_choices.anubis"), "choices", comment("integer of arbitrary size ")), + ]), + enum("float_field"), + alternative("char_field", [ + component(extern_type("HK_Text_Choices", model_types+"hk_text_choices.anubis"), "choices"), + component(int, "size", comment("text of maximal size 'size' (number of characters)")), + ]), + alternative("password_field", [ + component(int, "min_size", comment("the password field doesn't show the password string or store it in hashed version into database")), + ]), + alternative("text_field", comment("text of variable size"), + [ + component(extern_type("HK_Text_Field_Attr", model_types+"hk_text_field_attr.anubis"), "hk_text_field_attr"), + ]), + enum("color_field", comment("String which representing RGBA color like HTML")) ]), - alternative("password_field", [ - component(int, "min_size", comment("the password field doesn't show the password string or store it in hashed version into database")), + + // + ds_type("HK_Text_Field_Attr", [ + enum("none", comment("Nothing special, normal behaviour")), + enum("rich_editor", comment("Use richt text editor for that area")) ]), - alternative("text_field", comment("text of variable size"), - [ - component(extern_type("HK_Text_Field_Attr", model_types+"hk_text_field_attr.anubis"), "hk_text_field_attr"), + + // ds_type("HK_FK_Attr", [ + // enum("one_to_one", comment("Foreign key relation is one to one")), + // enum("many_to_one", comment("Foreign key relation is many to one")) + // ]), + + ds_type("HK_Int_Choices", [ + enum("no_choice", comment("No list choice is available. Hence the user must enter the value")), + alternative("int_choices", [ + component(list, extern_type("HK_Int_Choice", model_types+"hk_int_choice.anubis"), "hk_int_choice", comment("List of possible choices")) + ]) ]), - enum("color_field", comment("String which representing RGBA color like HTML")) - ]), - - // - ds_type("HK_Text_Field_Attr", [ - enum("none", comment("Nothing special, normal behaviour")), - enum("rich_editor", comment("Use richt text editor for that area")) - ]), - -// ds_type("HK_FK_Attr", [ -// enum("one_to_one", comment("Foreign key relation is one to one")), -// enum("many_to_one", comment("Foreign key relation is many to one")) -// ]), - - ds_type("HK_Int_Choices", [ - enum("no_choice", comment("No list choice is available. Hence the user must enter the value")), - alternative("int_choices", [ - component(list, extern_type("HK_Int_Choice", model_types+"hk_int_choice.anubis"), "hk_int_choice", comment("List of possible choices")) - ]) - ]), - - ds_type("HK_Int_Choice", [ - alternative("hk_int_choice", [ - component(int, "value", comment("value to set in database corresponding to description below")), - component(string, "visible", comment("visible string which help the user to choose teh correct choice")) - ]) - ]), - - ds_type("HK_Text_Choices", [ - enum("no_choice"), - alternative("text_choices", [ - component(list, extern_type("HK_Text_Choice", model_types+"hk_text_choice.anubis"), "hk_text_choice") - ]) - ]), - - ds_type("HK_Text_Choice", [ - alternative("hk_text_choice", [ - component(string, "value"), - component(string, "visible") - ]) - ]), - - ds_type("HK_App_Name", [ - enum("this"), - alternative("app_name", [ - component(string, "name"), + + ds_type("HK_Int_Choice", [ + alternative("hk_int_choice", [ + component(int, "value", comment("value to set in database corresponding to description below")), + component(string, "visible", comment("visible string which help the user to choose teh correct choice")) + ]) ]), - enum("none"), - ]), - - ds_type("HK_Datetime_Field_Attr", [ - enum("none", comment("Nothing special, normal behaviour")), - enum("auto_now", comment("Always update datetime at SQL update")), - enum("auto_now_add", comment("Set current datetime when row is created and can't be edited anymore")) - ]), - - ds_type("HK_Model_Attr", [ - enum("unique", comment("by default, the values in a column are not required to be all different ")), - alternative("default", [ - component(string, "default_str", comment("default value (used in case of creation of a NON NULL column in a table which already contains some rows)")), + + ds_type("HK_Text_Choices", [ + enum("no_choice"), + alternative("text_choices", [ + component(list, extern_type("HK_Text_Choice", model_types+"hk_text_choice.anubis"), "hk_text_choice") + ]) ]), - enum("not_null"), - ]), - - - - //HK_DISPLAY - ds_type("HK_Display", [ - alternative("hk_display", [ - component(list, extern_type("HK_List_View", view_types+"hk_list_view.anubis"), "list_views"), - component(list, extern_type("HK_Edit_View", view_types+"hk_edit_view.anubis"), "list_edits"), - ]) - ]), - + + ds_type("HK_Text_Choice", [ + alternative("hk_text_choice", [ + component(string, "value"), + component(string, "visible") + ]) + ]), + + ds_type("HK_App_Name", [ + enum("this"), + alternative("app_name", [ + component(string, "name"), + ]), + enum("none"), + ]), + + ds_type("HK_Datetime_Field_Attr", [ + enum("none", comment("Nothing special, normal behaviour")), + enum("auto_now", comment("Always update datetime at SQL update")), + enum("auto_now_add", comment("Set current datetime when row is created and can't be edited anymore")) + ]), + + ds_type("HK_Model_Attr", [ + enum("unique", comment("by default, the values in a column are not required to be all different ")), + alternative("default", [ + component(string, "default_str", comment("default value (used in case of creation of a NON NULL column in a table which already contains some rows)")), + ]), + enum("not_null"), + ]), + + + + //HK_DISPLAY + ds_type("HK_Display", [ + alternative("hk_display", [ + component(list, extern_type("HK_Viewer", view_types+"hk_viewer.anubis"), "l_viewer"), + component(list, extern_type("HK_Editor", view_types+"hk_editor.anubis"), "l_editor"), + ]) + ]), + + + + ds_type("HK_Viewer", [ + enum("list_view_all"), + alternative("list_view", [ + component(string, "view_name"), + component(list, string, "columns"), + component(extern_type("WEB_Action_Name", "calexium_lib/web/types/web_action_name.anubis"), "link_id_action") + ]) + ]), + + ds_type("HK_FK_View", [ + alternative("fk_view", [ + component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"), + component(string, "table_name"), + component(string, "fk_col_name", comment("column name of the foreign key. The column name must exists in the hk_model")), + ]) + ]), + + ds_type("HK_Form_Table_Cell", no_message, [ + alternative("hk_form_table_cell", [ + component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry") + ]) + ]), + + ds_type("HK_Form_Table_Line", no_message, [ + alternative("hk_form_table_line", [ + component(list, extern_type("HK_Form_Table_Cell", view_types+"hk_form_table_cell.anubis"), "form_table_cells") + ]) + ]), + + ds_type("HK_Form_Table_Attribute", [ + alternative("hidden", [ + component(string, "name"), + component(string, "value") + ]) + ]), + + ds_type("HK_Form_Table", no_message, [ + alternative("hk_form_table", [ + component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"), + component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines") + ]) + ]), + - - ds_type("HK_List_View", [ - enum("list_view_all"), - alternative("list_view", [ - component(string, "view_name"), - component(list, string, "columns"), - component(extern_type("WEB_Action_Name", "calexium_lib/web/types/web_action_name.anubis"), "link_id_action") - ]) - ]), + - ds_type("HK_FK_View", [ - alternative("fk_view", [ - component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"), - component(string, "table_name"), - component(string, "fk_col_name", comment("column name of the foreign key. The column name must exists in the hk_model")), - ]) - ]), - - ds_type("HK_Form_Table_Cell", no_message, [ - alternative("hk_form_table_cell", [ - component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry") - ]) - ]), - - ds_type("HK_Form_Table_Line", no_message, [ - alternative("hk_form_table_line", [ - component(list, extern_type("HK_Form_Table_Cell", view_types+"hk_form_table_cell.anubis"), "form_table_cells") - ]) - ]), - - ds_type("HK_Form_Table_Attribute", [ - alternative("hidden", [ - component(string, "name"), - component(string, "value") - ]) - ]), - - ds_type("HK_Form_Table", no_message, [ - alternative("hk_form_table", [ - component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"), - component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines") - ]) - ]), - - ds_type("HK_Edit_View_Table_Cell", [ - enum("empty"), - alternative("column", [ - component(string, "column_name") + + ds_type("HK_Editor", [ + enum("edit_view_all"), + alternative("edit_view_list_form", [ + component(string, "view_name"), + component(list, string, "columns"), + component(list, extern_type("HK_FK_View", view_types+"hk_fk_view.anubis"), "fk_view") + ]), + alternative("form_table", [ + component(string, "view_name"), + component(extern_type("HK_Editor_Table", view_types+"hk_editor_table.anubis"), "form_table") + ]) ]), - alternative("label", [ - component(string, "label"), + + ds_type("HK_Form_Tab", no_message, [ + alternative("hk_form_tab", [ + component(string, "fk_table_name"), + component(string, "fk_col_name"), + component(string, "list_view_name") + ]) ]), - alternative("cell", [ - component(list, extern_type("HK_Edit_View_Table_Cell", view_types+"hk_edit_view_table_cell.anubis"), "cell") - ]) - ]), - - ds_type("HK_Edit_View_Table_Line", [ - alternative("line", [ - component(list, extern_type("HK_Edit_View_Table_Cell", view_types+"hk_edit_view_table_cell.anubis"), "cells") - ]) - ]), - - ds_type("HK_Edit_View_Table", [ - alternative("table", [ - component(list, extern_type("HK_Edit_View_Table_Line", view_types+"hk_edit_view_table_line.anubis"), "lines") - ]) - ]), - - ds_type("HK_Edit_View", [ - enum("edit_view_all"), - alternative("edit_view_list_form", [ - component(string, "view_name"), - component(list, string, "columns"), - component(list, extern_type("HK_FK_View", view_types+"hk_fk_view.anubis"), "fk_view") + + ds_type("HK_Form", no_message, [ + alternative("hk_form_in_list", [ + component(string, "table_name", comment("database table name which belonging this form")), + component(string, "view_name", comment("name of the view")), + component(list, extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "list"), + component(list, extern_type("HK_Form_Tab", view_types+"hk_form_tab.anubis"), "tabs") + ]), + alternative("hk_form_in_table", [ + component(string, "table_name", comment("database table name which belonging this form")), + component(string, "view_name", comment("name of the view")), + component(extern_type("HK_Form_Table", view_types+"hk_form_table.anubis"), "form_in_table") + ]) + ]) + + ] + ), + ds_type_file(auto, name("hk_editor_table"), + [ + ds_type("HK_Editor_Table_Cell", [ + enum("empty"), + alternative("column", [ + component(string, "column_name") + ]), + alternative("label", [ + component(string, "label"), + ]), + alternative("table", [ + component(list, ds_type("HK_Editor_Table_Line"), "lines") + ]) ]), - alternative("edit_view_table_form", [ - component(string, "view_name"), - component(extern_type("HK_Edit_View_Table", view_types+"hk_edit_view_table.anubis"), "form_table") - ]) - ]), - - ds_type("HK_Form_Tab", no_message, [ - alternative("hk_form_tab", [ - component(string, "fk_table_name"), - component(string, "fk_col_name"), - component(string, "list_view_name") - ]) - ]), - - ds_type("HK_Form", no_message, [ - alternative("hk_form_in_list", [ - component(string, "table_name", comment("database table name which belonging this form")), - component(string, "view_name", comment("name of the view")), - component(list, extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "list"), - component(list, extern_type("HK_Form_Tab", view_types+"hk_form_tab.anubis"), "tabs") + + ds_type("HK_Editor_Table_Line", [ + alternative("line", [ + component(list, ds_type("HK_Editor_Table_Cell"), "cells") + ]) ]), - alternative("hk_form_in_table", [ - component(string, "table_name", comment("database table name which belonging this form")), - component(string, "view_name", comment("name of the view")), - component(extern_type("HK_Form_Table", view_types+"hk_form_table.anubis"), "form_in_table") - ]) - ]) - + ds_type("HK_Editor_Table", [ + alternative("table", [ + component(list, ds_type("HK_Editor_Table_Line"), "lines") + ]) + ]), + + ]) + ] . diff --git a/model/types/hk_app.anubis b/model/types/hk_app.anubis index 3144058..b45bf16 100644 --- a/model/types/hk_app.anubis +++ b/model/types/hk_app.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -14,6 +14,8 @@ transmit hayamiki_lib/model/types/hk_table.anubis transmit hayamiki_lib/model/types/hk_help_text.anubis transmit hayamiki_lib/model/types/hk_icon.anubis + + public type HK_App: hk_app( String app_name, diff --git a/model/types/hk_app_name.anubis b/model/types/hk_app_name.anubis index 8eec30f..84df608 100644 --- a/model/types/hk_app_name.anubis +++ b/model/types/hk_app_name.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_App_Name: this, app_name( diff --git a/model/types/hk_database.anubis b/model/types/hk_database.anubis index 121a19c..5170a6e 100644 --- a/model/types/hk_database.anubis +++ b/model/types/hk_database.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/model/types/hk_app.anubis + + public type HK_Database: hk_database( String name, //name of the database diff --git a/model/types/hk_datetime_field_attr.anubis b/model/types/hk_datetime_field_attr.anubis index 99377c8..555dba2 100644 --- a/model/types/hk_datetime_field_attr.anubis +++ b/model/types/hk_datetime_field_attr.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Datetime_Field_Attr: none, //Nothing special, normal behaviour auto_now, //Always update datetime at SQL update diff --git a/model/types/hk_help_text.anubis b/model/types/hk_help_text.anubis index 4de71a3..9a69bbe 100644 --- a/model/types/hk_help_text.anubis +++ b/model/types/hk_help_text.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Help_Text: no_help_text, //no help text available help_text_TAG( diff --git a/model/types/hk_icon.anubis b/model/types/hk_icon.anubis index fd8fd37..b4dc992 100644 --- a/model/types/hk_icon.anubis +++ b/model/types/hk_icon.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Icon: no_icon, icon16( diff --git a/model/types/hk_int_choice.anubis b/model/types/hk_int_choice.anubis index 98ffef6..73f7621 100644 --- a/model/types/hk_int_choice.anubis +++ b/model/types/hk_int_choice.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Int_Choice: hk_int_choice( Int value, //value to set in database corresponding to description below diff --git a/model/types/hk_int_choices.anubis b/model/types/hk_int_choices.anubis index d226aa5..3dc1f46 100644 --- a/model/types/hk_int_choices.anubis +++ b/model/types/hk_int_choices.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/model/types/hk_int_choice.anubis + + public type HK_Int_Choices: no_choice, //No list choice is available. Hence the user must enter the value int_choices( diff --git a/model/types/hk_model.anubis b/model/types/hk_model.anubis index a6e2f49..fe81cfb 100644 --- a/model/types/hk_model.anubis +++ b/model/types/hk_model.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/model/types/hk_model_column.anubis + + public type HK_Model: hk_model( List(HK_Model_Column) columns, //columns other than the primary key column (if any) diff --git a/model/types/hk_model_attr.anubis b/model/types/hk_model_attr.anubis index a2126a6..e21d9b8 100644 --- a/model/types/hk_model_attr.anubis +++ b/model/types/hk_model_attr.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Model_Attr: unique, //by default, the values in a column are not required to be all different default( diff --git a/model/types/hk_model_column.anubis b/model/types/hk_model_column.anubis index 78f7e8f..010f0c1 100644 --- a/model/types/hk_model_column.anubis +++ b/model/types/hk_model_column.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -14,6 +14,8 @@ transmit hayamiki_lib/model/types/hk_help_text.anubis transmit hayamiki_lib/model/types/hk_model_attr.anubis transmit hayamiki_lib/model/types/hk_model_field.anubis + + public type HK_Model_Column: hk_column( String name, //name of ordinary column (i.e. all but 'id') diff --git a/model/types/hk_model_field.anubis b/model/types/hk_model_field.anubis index 21c6664..cff0337 100644 --- a/model/types/hk_model_field.anubis +++ b/model/types/hk_model_field.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -16,6 +16,8 @@ transmit hayamiki_lib/model/types/hk_int_choices.anubis transmit hayamiki_lib/model/types/hk_app_name.anubis transmit hayamiki_lib/model/types/hk_datetime_field_attr.anubis + + public type HK_Model_Field: p_key, boolean_field, //true or false diff --git a/model/types/hk_table.anubis b/model/types/hk_table.anubis index dde040e..dbc3d56 100644 --- a/model/types/hk_table.anubis +++ b/model/types/hk_table.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -13,6 +13,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/view/types/hk_display.anubis transmit hayamiki_lib/model/types/hk_model.anubis + + public type HK_Table: hk_table( String name, //name of the table diff --git a/model/types/hk_text_choice.anubis b/model/types/hk_text_choice.anubis index 8f4f703..bdec710 100644 --- a/model/types/hk_text_choice.anubis +++ b/model/types/hk_text_choice.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Text_Choice: hk_text_choice( String value, diff --git a/model/types/hk_text_choices.anubis b/model/types/hk_text_choices.anubis index 4c481e6..a19d593 100644 --- a/model/types/hk_text_choices.anubis +++ b/model/types/hk_text_choices.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/model/types/hk_text_choice.anubis + + public type HK_Text_Choices: no_choice, text_choices( diff --git a/model/types/hk_text_field_attr.anubis b/model/types/hk_text_field_attr.anubis index 31b24a8..b197cdf 100644 --- a/model/types/hk_text_field_attr.anubis +++ b/model/types/hk_text_field_attr.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Text_Field_Attr: none, //Nothing special, normal behaviour rich_editor //Use richt text editor for that area diff --git a/view/types/hk_display.anubis b/view/types/hk_display.anubis index d0f7de7..1af329c 100644 --- a/view/types/hk_display.anubis +++ b/view/types/hk_display.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -10,13 +10,15 @@ transmit system/muscle.anubis transmit system/convert.anubis transmit tools/basis.anubis -transmit hayamiki_lib/view/types/hk_edit_view.anubis -transmit hayamiki_lib/view/types/hk_list_view.anubis +transmit hayamiki_lib/view/types/hk_editor.anubis +transmit hayamiki_lib/view/types/hk_viewer.anubis + + public type HK_Display: hk_display( - List(HK_List_View) list_views, - List(HK_Edit_View) list_edits + List(HK_Viewer) l_viewer, + List(HK_Editor) l_editor ) . @@ -34,12 +36,12 @@ public define Message if _hk_display is { //Alternative hk_display - hk_display(__list_views, __list_edits) then + hk_display(__l_viewer, __l_editor) then forget(add_string(_hk_display_message, "__TYPE_ALT__", "hk_display")); - // [type = List(HK_List_View)] hk_display.list_views - map_forget((HK_List_View _list_views) |-> add_message(_hk_display_message, "list_views", to_Message(_list_views)), __list_views); - // [type = List(HK_Edit_View)] hk_display.list_edits - map_forget((HK_Edit_View _list_edits) |-> add_message(_hk_display_message, "list_edits", to_Message(_list_edits)), __list_edits), + // [type = List(HK_Viewer)] hk_display.l_viewer + map_forget((HK_Viewer _l_viewer) |-> add_message(_hk_display_message, "l_viewer", to_Message(_l_viewer)), __l_viewer); + // [type = List(HK_Editor)] hk_display.l_editor + map_forget((HK_Editor _l_editor) |-> add_message(_hk_display_message, "l_editor", to_Message(_l_editor)), __l_editor), }; _hk_display_message @@ -55,14 +57,14 @@ public define Maybe(HK_Display) if __type__ = "HK_Display" then //Alternative hk_display if __type_alt__ = "hk_display" then //Alternative hk_display - // [type = List(HK_List_View)] hk_display.list_views - with mb__list_views_ = map_escape(( Message msg ) |-> (Maybe(HK_List_View)) from_Message(msg), find_messages(_hk_display_message, "list_views")), - if mb__list_views_ is {failure then failure, success(_list_views_) then - // [type = List(HK_Edit_View)] hk_display.list_edits - with mb__list_edits_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View)) from_Message(msg), find_messages(_hk_display_message, "list_edits")), - if mb__list_edits_ is {failure then failure, success(_list_edits_) then + // [type = List(HK_Viewer)] hk_display.l_viewer + with mb__l_viewer_ = map_escape(( Message msg ) |-> (Maybe(HK_Viewer)) from_Message(msg), find_messages(_hk_display_message, "l_viewer")), + if mb__l_viewer_ is {failure then failure, success(_l_viewer_) then + // [type = List(HK_Editor)] hk_display.l_editor + with mb__l_editor_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor)) from_Message(msg), find_messages(_hk_display_message, "l_editor")), + if mb__l_editor_ is {failure then failure, success(_l_editor_) then - success(hk_display(_list_views_, _list_edits_)) + success(hk_display(_l_viewer_, _l_editor_)) }} else failure //No valid Alternative found ! diff --git a/view/types/hk_edit_view.anubis b/view/types/hk_edit_view.anubis deleted file mode 100644 index 8b8f956..0000000 --- a/view/types/hk_edit_view.anubis +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Created by 伝作 (Densaku). - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 - * - */ - -transmit system/muscle.anubis -transmit system/convert.anubis -transmit tools/basis.anubis - -transmit hayamiki_lib/view/types/hk_edit_view_table.anubis -transmit hayamiki_lib/view/types/hk_fk_view.anubis - -public type HK_Edit_View: - edit_view_all, - edit_view_list_form( - String view_name, - List(String) columns, - List(HK_FK_View) fk_view - ), - edit_view_table_form( - String view_name, - HK_Edit_View_Table form_table - ) -. - - HK_Edit_View message format - =========================== - - -public define Message - to_Message - ( - HK_Edit_View _hk_edit_view - )= - with _hk_edit_view_message = message((Word32)0), // - forget(add_string(_hk_edit_view_message, "__TYPE__", "HK_Edit_View")); - if _hk_edit_view is - { - //Alternative edit_view_all (NO TYPE) - edit_view_all then - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_all")), - - //Alternative edit_view_list_form - edit_view_list_form(_view_name, __columns, __fk_view) then - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_list_form")); - // [type = String] edit_view_list_form.view_name - forget(add_string(_hk_edit_view_message, "view_name", _view_name)); - // [type = List(String)] edit_view_list_form.columns - map_forget((String _columns) |-> add_string(_hk_edit_view_message, "columns", _columns), __columns); - // [type = List(HK_FK_View)] edit_view_list_form.fk_view - map_forget((HK_FK_View _fk_view) |-> add_message(_hk_edit_view_message, "fk_view", to_Message(_fk_view)), __fk_view), - - //Alternative edit_view_table_form - edit_view_table_form(_view_name, _form_table) then - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_table_form")); - // [type = String] edit_view_table_form.view_name - forget(add_string(_hk_edit_view_message, "view_name", _view_name)); - // [type = HK_Edit_View_Table] edit_view_table_form.form_table - forget(add_message(_hk_edit_view_message, "form_table", to_Message(_form_table))), - - }; - _hk_edit_view_message -. - -public define Maybe(HK_Edit_View) - from_Message - ( - Message _hk_edit_view_message - )= - if find_string(_hk_edit_view_message, "__TYPE__") is {failure then failure, success(__type__) then - if find_string(_hk_edit_view_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then - if __type__ = "HK_Edit_View" then - //Alternative edit_view_all (NO TYPE) - if __type_alt__ = "edit_view_all" then - success(edit_view_all) - else //Alternative edit_view_list_form - if __type_alt__ = "edit_view_list_form" then //Alternative edit_view_list_form - // [type = String] edit_view_list_form.view_name - if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(_view_name_) then - // [type = List(String)] edit_view_list_form.columns - with _columns_ = find_string_list(_hk_edit_view_message, "columns"), - // [type = List(HK_FK_View)] edit_view_list_form.fk_view - with mb__fk_view_ = map_escape(( Message msg ) |-> (Maybe(HK_FK_View)) from_Message(msg), find_messages(_hk_edit_view_message, "fk_view")), - if mb__fk_view_ is {failure then failure, success(_fk_view_) then - - success(edit_view_list_form(_view_name_, _columns_, _fk_view_)) - }} - else //Alternative edit_view_table_form - if __type_alt__ = "edit_view_table_form" then //Alternative edit_view_table_form - // [type = String] edit_view_table_form.view_name - if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(_view_name_) then - // [type = HK_Edit_View_Table] edit_view_table_form.form_table - if find_message(_hk_edit_view_message, "form_table") is {failure then failure, success(_form_table__msg) then - if (Maybe(HK_Edit_View_Table))from_Message(_form_table__msg) is {failure then failure, success(_form_table_) then - - success(edit_view_table_form(_view_name_, _form_table_)) - }}} - else - failure //No valid Alternative found ! - else - failure //Type not found in message ! - }} -. - diff --git a/view/types/hk_edit_view_table.anubis b/view/types/hk_edit_view_table.anubis deleted file mode 100644 index b0a482b..0000000 --- a/view/types/hk_edit_view_table.anubis +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Created by 伝作 (Densaku). - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 - * - */ - -transmit system/muscle.anubis -transmit system/convert.anubis -transmit tools/basis.anubis - -transmit hayamiki_lib/view/types/hk_edit_view_table_line.anubis - -public type HK_Edit_View_Table: - table( - List(HK_Edit_View_Table_Line) lines - ) -. - - HK_Edit_View_Table message format - ================================= - - -public define Message - to_Message - ( - HK_Edit_View_Table _hk_edit_view_table - )= - with _hk_edit_view_table_message = message((Word32)0), // - forget(add_string(_hk_edit_view_table_message, "__TYPE__", "HK_Edit_View_Table")); - if _hk_edit_view_table is - { - //Alternative table - table(__lines) then - forget(add_string(_hk_edit_view_table_message, "__TYPE_ALT__", "table")); - // [type = List(HK_Edit_View_Table_Line)] table.lines - map_forget((HK_Edit_View_Table_Line _lines) |-> add_message(_hk_edit_view_table_message, "lines", to_Message(_lines)), __lines), - - }; - _hk_edit_view_table_message -. - -public define Maybe(HK_Edit_View_Table) - from_Message - ( - Message _hk_edit_view_table_message - )= - if find_string(_hk_edit_view_table_message, "__TYPE__") is {failure then failure, success(__type__) then - if find_string(_hk_edit_view_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then - if __type__ = "HK_Edit_View_Table" then - //Alternative table - if __type_alt__ = "table" then //Alternative table - // [type = List(HK_Edit_View_Table_Line)] table.lines - with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Line)) from_Message(msg), find_messages(_hk_edit_view_table_message, "lines")), - if mb__lines_ is {failure then failure, success(_lines_) then - - success(table(_lines_)) - } - else - failure //No valid Alternative found ! - else - failure //Type not found in message ! - }} -. - diff --git a/view/types/hk_edit_view_table_cell.anubis b/view/types/hk_edit_view_table_cell.anubis deleted file mode 100644 index 530cb00..0000000 --- a/view/types/hk_edit_view_table_cell.anubis +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Created by 伝作 (Densaku). - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 - * - */ - -transmit system/muscle.anubis -transmit system/convert.anubis -transmit tools/basis.anubis - -transmit hayamiki_lib/view/types/hk_edit_view_table_cell.anubis - -public type HK_Edit_View_Table_Cell: - empty, - column( - String column_name - ), - label( - String label - ), - cell( - List(HK_Edit_View_Table_Cell) cell - ) -. - - HK_Edit_View_Table_Cell message format - ====================================== - - -public define Message - to_Message - ( - HK_Edit_View_Table_Cell _hk_edit_view_table_cell - )= - with _hk_edit_view_table_cell_message = message((Word32)0), // - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE__", "HK_Edit_View_Table_Cell")); - if _hk_edit_view_table_cell is - { - //Alternative empty (NO TYPE) - empty then - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "empty")), - - //Alternative column - column(_column_name) then - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "column")); - // [type = String] column.column_name - forget(add_string(_hk_edit_view_table_cell_message, "column_name", _column_name)), - - //Alternative label - label(_label) then - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "label")); - // [type = String] label.label - forget(add_string(_hk_edit_view_table_cell_message, "label", _label)), - - //Alternative cell - cell(__cell) then - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "cell")); - // [type = List(HK_Edit_View_Table_Cell)] cell.cell - map_forget((HK_Edit_View_Table_Cell _cell) |-> add_message(_hk_edit_view_table_cell_message, "cell", to_Message(_cell)), __cell), - - }; - _hk_edit_view_table_cell_message -. - -public define Maybe(HK_Edit_View_Table_Cell) - from_Message - ( - Message _hk_edit_view_table_cell_message - )= - if find_string(_hk_edit_view_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then - if find_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then - if __type__ = "HK_Edit_View_Table_Cell" then - //Alternative empty (NO TYPE) - if __type_alt__ = "empty" then - success(empty) - else //Alternative column - if __type_alt__ = "column" then //Alternative column - // [type = String] column.column_name - if find_string(_hk_edit_view_table_cell_message, "column_name") is {failure then failure, success(_column_name_) then - - success(column(_column_name_)) - } - else //Alternative label - if __type_alt__ = "label" then //Alternative label - // [type = String] label.label - if find_string(_hk_edit_view_table_cell_message, "label") is {failure then failure, success(_label_) then - - success(label(_label_)) - } - else //Alternative cell - if __type_alt__ = "cell" then //Alternative cell - // [type = List(HK_Edit_View_Table_Cell)] cell.cell - with mb__cell_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_cell_message, "cell")), - if mb__cell_ is {failure then failure, success(_cell_) then - - success(cell(_cell_)) - } - else - failure //No valid Alternative found ! - else - failure //Type not found in message ! - }} -. - diff --git a/view/types/hk_edit_view_table_line.anubis b/view/types/hk_edit_view_table_line.anubis deleted file mode 100644 index 00c87d1..0000000 --- a/view/types/hk_edit_view_table_line.anubis +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Created by 伝作 (Densaku). - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 - * - */ - -transmit system/muscle.anubis -transmit system/convert.anubis -transmit tools/basis.anubis - -transmit hayamiki_lib/view/types/hk_edit_view_table_cell.anubis - -public type HK_Edit_View_Table_Line: - line( - List(HK_Edit_View_Table_Cell) cells - ) -. - - HK_Edit_View_Table_Line message format - ====================================== - - -public define Message - to_Message - ( - HK_Edit_View_Table_Line _hk_edit_view_table_line - )= - with _hk_edit_view_table_line_message = message((Word32)0), // - forget(add_string(_hk_edit_view_table_line_message, "__TYPE__", "HK_Edit_View_Table_Line")); - if _hk_edit_view_table_line is - { - //Alternative line - line(__cells) then - forget(add_string(_hk_edit_view_table_line_message, "__TYPE_ALT__", "line")); - // [type = List(HK_Edit_View_Table_Cell)] line.cells - map_forget((HK_Edit_View_Table_Cell _cells) |-> add_message(_hk_edit_view_table_line_message, "cells", to_Message(_cells)), __cells), - - }; - _hk_edit_view_table_line_message -. - -public define Maybe(HK_Edit_View_Table_Line) - from_Message - ( - Message _hk_edit_view_table_line_message - )= - if find_string(_hk_edit_view_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then - if find_string(_hk_edit_view_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then - if __type__ = "HK_Edit_View_Table_Line" then - //Alternative line - if __type_alt__ = "line" then //Alternative line - // [type = List(HK_Edit_View_Table_Cell)] line.cells - with mb__cells_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_line_message, "cells")), - if mb__cells_ is {failure then failure, success(_cells_) then - - success(line(_cells_)) - } - else - failure //No valid Alternative found ! - else - failure //Type not found in message ! - }} -. - diff --git a/view/types/hk_editor.anubis b/view/types/hk_editor.anubis new file mode 100644 index 0000000..82d5bea --- /dev/null +++ b/view/types/hk_editor.anubis @@ -0,0 +1,109 @@ +/* + * Created by 伝作 (Densaku). + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) + * Date: 2017-04-12 + * Time: 22:22:45 + * + */ + +transmit system/muscle.anubis +transmit system/convert.anubis +transmit tools/basis.anubis + +transmit hayamiki_lib/view/types/hk_editor_table.anubis +transmit hayamiki_lib/view/types/hk_fk_view.anubis + + + +public type HK_Editor: + edit_view_all, + edit_view_list_form( + String view_name, + List(String) columns, + List(HK_FK_View) fk_view + ), + form_table( + String view_name, + HK_Editor_Table form_table + ) +. + + HK_Editor message format + ======================== + + +public define Message + to_Message + ( + HK_Editor _hk_editor + )= + with _hk_editor_message = message((Word32)0), // + forget(add_string(_hk_editor_message, "__TYPE__", "HK_Editor")); + if _hk_editor is + { + //Alternative edit_view_all (NO TYPE) + edit_view_all then + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "edit_view_all")), + + //Alternative edit_view_list_form + edit_view_list_form(_view_name, __columns, __fk_view) then + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "edit_view_list_form")); + // [type = String] edit_view_list_form.view_name + forget(add_string(_hk_editor_message, "view_name", _view_name)); + // [type = List(String)] edit_view_list_form.columns + map_forget((String _columns) |-> add_string(_hk_editor_message, "columns", _columns), __columns); + // [type = List(HK_FK_View)] edit_view_list_form.fk_view + map_forget((HK_FK_View _fk_view) |-> add_message(_hk_editor_message, "fk_view", to_Message(_fk_view)), __fk_view), + + //Alternative form_table + form_table(_view_name, _form_table) then + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "form_table")); + // [type = String] form_table.view_name + forget(add_string(_hk_editor_message, "view_name", _view_name)); + // [type = HK_Editor_Table] form_table.form_table + forget(add_message(_hk_editor_message, "form_table", to_Message(_form_table))), + + }; + _hk_editor_message +. + +public define Maybe(HK_Editor) + from_Message + ( + Message _hk_editor_message + )= + if find_string(_hk_editor_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_editor_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Editor" then + //Alternative edit_view_all (NO TYPE) + if __type_alt__ = "edit_view_all" then + success(edit_view_all) + else //Alternative edit_view_list_form + if __type_alt__ = "edit_view_list_form" then //Alternative edit_view_list_form + // [type = String] edit_view_list_form.view_name + if find_string(_hk_editor_message, "view_name") is {failure then failure, success(_view_name_) then + // [type = List(String)] edit_view_list_form.columns + with _columns_ = find_string_list(_hk_editor_message, "columns"), + // [type = List(HK_FK_View)] edit_view_list_form.fk_view + with mb__fk_view_ = map_escape(( Message msg ) |-> (Maybe(HK_FK_View)) from_Message(msg), find_messages(_hk_editor_message, "fk_view")), + if mb__fk_view_ is {failure then failure, success(_fk_view_) then + + success(edit_view_list_form(_view_name_, _columns_, _fk_view_)) + }} + else //Alternative form_table + if __type_alt__ = "form_table" then //Alternative form_table + // [type = String] form_table.view_name + if find_string(_hk_editor_message, "view_name") is {failure then failure, success(_view_name_) then + // [type = HK_Editor_Table] form_table.form_table + if find_message(_hk_editor_message, "form_table") is {failure then failure, success(_form_table__msg) then + if (Maybe(HK_Editor_Table))from_Message(_form_table__msg) is {failure then failure, success(_form_table_) then + + success(form_table(_view_name_, _form_table_)) + }}} + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + diff --git a/view/types/hk_editor_table.anubis b/view/types/hk_editor_table.anubis new file mode 100644 index 0000000..6b4579f --- /dev/null +++ b/view/types/hk_editor_table.anubis @@ -0,0 +1,219 @@ +/* + * Created by 伝作 (Densaku). + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) + * Date: 2017-04-12 + * Time: 22:22:45 + * + */ + +transmit system/muscle.anubis +transmit system/convert.anubis +transmit tools/basis.anubis + + +public type HK_Editor_Table_Line:... + +public type HK_Editor_Table_Cell: + empty, + column( + String column_name + ), + label( + String label + ), + table( + List(HK_Editor_Table_Line) lines + ) +. + + +public type HK_Editor_Table_Line: + line( + List(HK_Editor_Table_Cell) cells + ) +. + + +public type HK_Editor_Table: + table( + List(HK_Editor_Table_Line) lines + ) +. + + HK_Editor_Table_Cell message format + =================================== + + +public define Message + to_Message + ( + HK_Editor_Table_Cell _hk_editor_table_cell + )= + with _hk_editor_table_cell_message = message((Word32)0), // + forget(add_string(_hk_editor_table_cell_message, "__TYPE__", "HK_Editor_Table_Cell")); + if _hk_editor_table_cell is + { + //Alternative empty (NO TYPE) + empty then + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "empty")), + + //Alternative column + column(_column_name) then + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "column")); + // [type = String] column.column_name + forget(add_string(_hk_editor_table_cell_message, "column_name", _column_name)), + + //Alternative label + label(_label) then + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "label")); + // [type = String] label.label + forget(add_string(_hk_editor_table_cell_message, "label", _label)), + + //Alternative table + table(__lines) then + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "table")); + // [type = List(HK_Editor_Table_Line)] table.lines + map_forget((HK_Editor_Table_Line _lines) |-> add_message(_hk_editor_table_cell_message, "lines", to_Message(_lines)), __lines), + + }; + _hk_editor_table_cell_message +. + +public define Maybe(HK_Editor_Table_Cell) + from_Message + ( + Message _hk_editor_table_cell_message + )= + if find_string(_hk_editor_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_editor_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Editor_Table_Cell" then + //Alternative empty (NO TYPE) + if __type_alt__ = "empty" then + success(empty) + else //Alternative column + if __type_alt__ = "column" then //Alternative column + // [type = String] column.column_name + if find_string(_hk_editor_table_cell_message, "column_name") is {failure then failure, success(_column_name_) then + + success(column(_column_name_)) + } + else //Alternative label + if __type_alt__ = "label" then //Alternative label + // [type = String] label.label + if find_string(_hk_editor_table_cell_message, "label") is {failure then failure, success(_label_) then + + success(label(_label_)) + } + else //Alternative table + if __type_alt__ = "table" then //Alternative table + // [type = List(HK_Editor_Table_Line)] table.lines + with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Line)) from_Message(msg), find_messages(_hk_editor_table_cell_message, "lines")), + if mb__lines_ is {failure then failure, success(_lines_) then + + success(table(_lines_)) + } + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + + + + + HK_Editor_Table_Line message format + =================================== + + +public define Message + to_Message + ( + HK_Editor_Table_Line _hk_editor_table_line + )= + with _hk_editor_table_line_message = message((Word32)0), // + forget(add_string(_hk_editor_table_line_message, "__TYPE__", "HK_Editor_Table_Line")); + if _hk_editor_table_line is + { + //Alternative line + line(__cells) then + forget(add_string(_hk_editor_table_line_message, "__TYPE_ALT__", "line")); + // [type = List(HK_Editor_Table_Cell)] line.cells + map_forget((HK_Editor_Table_Cell _cells) |-> add_message(_hk_editor_table_line_message, "cells", to_Message(_cells)), __cells), + + }; + _hk_editor_table_line_message +. + +public define Maybe(HK_Editor_Table_Line) + from_Message + ( + Message _hk_editor_table_line_message + )= + if find_string(_hk_editor_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_editor_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Editor_Table_Line" then + //Alternative line + if __type_alt__ = "line" then //Alternative line + // [type = List(HK_Editor_Table_Cell)] line.cells + with mb__cells_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Cell)) from_Message(msg), find_messages(_hk_editor_table_line_message, "cells")), + if mb__cells_ is {failure then failure, success(_cells_) then + + success(line(_cells_)) + } + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + + + + + HK_Editor_Table message format + ============================== + + +public define Message + to_Message + ( + HK_Editor_Table _hk_editor_table + )= + with _hk_editor_table_message = message((Word32)0), // + forget(add_string(_hk_editor_table_message, "__TYPE__", "HK_Editor_Table")); + if _hk_editor_table is + { + //Alternative table + table(__lines) then + forget(add_string(_hk_editor_table_message, "__TYPE_ALT__", "table")); + // [type = List(HK_Editor_Table_Line)] table.lines + map_forget((HK_Editor_Table_Line _lines) |-> add_message(_hk_editor_table_message, "lines", to_Message(_lines)), __lines), + + }; + _hk_editor_table_message +. + +public define Maybe(HK_Editor_Table) + from_Message + ( + Message _hk_editor_table_message + )= + if find_string(_hk_editor_table_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_editor_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Editor_Table" then + //Alternative table + if __type_alt__ = "table" then //Alternative table + // [type = List(HK_Editor_Table_Line)] table.lines + with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Line)) from_Message(msg), find_messages(_hk_editor_table_message, "lines")), + if mb__lines_ is {failure then failure, success(_lines_) then + + success(table(_lines_)) + } + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + diff --git a/view/types/hk_fk_view.anubis b/view/types/hk_fk_view.anubis index 39878b8..8fa9ea0 100644 --- a/view/types/hk_fk_view.anubis +++ b/view/types/hk_fk_view.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/model/types/hk_app_name.anubis + + public type HK_FK_View: fk_view( HK_App_Name app_name, diff --git a/view/types/hk_form.anubis b/view/types/hk_form.anubis index dbe06b7..e860f6f 100644 --- a/view/types/hk_form.anubis +++ b/view/types/hk_form.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -14,6 +14,8 @@ transmit hayamiki_lib/view/types/hk_form_table.anubis transmit hayamiki_lib/view/types/hk_form_tab.anubis transmit hayamiki_lib/view/types/hk_form_entry.anubis + + public type HK_Form: hk_form_in_list( String table_name, //database table name which belonging this form diff --git a/view/types/hk_form_tab.anubis b/view/types/hk_form_tab.anubis index 9724f94..2dae8dd 100644 --- a/view/types/hk_form_tab.anubis +++ b/view/types/hk_form_tab.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Form_Tab: hk_form_tab( String fk_table_name, diff --git a/view/types/hk_form_table.anubis b/view/types/hk_form_table.anubis index 8fd692f..9b69ba4 100644 --- a/view/types/hk_form_table.anubis +++ b/view/types/hk_form_table.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -13,6 +13,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/view/types/hk_form_table_line.anubis transmit hayamiki_lib/view/types/hk_form_table_attribute.anubis + + public type HK_Form_Table: hk_form_table( List(HK_Form_Table_Attribute) table_attr, diff --git a/view/types/hk_form_table_attribute.anubis b/view/types/hk_form_table_attribute.anubis index 7faf594..d2c5700 100644 --- a/view/types/hk_form_table_attribute.anubis +++ b/view/types/hk_form_table_attribute.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -11,6 +11,8 @@ transmit system/convert.anubis transmit tools/basis.anubis + + public type HK_Form_Table_Attribute: hidden( String name, diff --git a/view/types/hk_form_table_cell.anubis b/view/types/hk_form_table_cell.anubis index 24f6f3d..1a0b5bf 100644 --- a/view/types/hk_form_table_cell.anubis +++ b/view/types/hk_form_table_cell.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/view/types/hk_form_entry.anubis + + public type HK_Form_Table_Cell: hk_form_table_cell( HK_Form_Entry form_entry diff --git a/view/types/hk_form_table_line.anubis b/view/types/hk_form_table_line.anubis index b247a8f..296dfa1 100644 --- a/view/types/hk_form_table_line.anubis +++ b/view/types/hk_form_table_line.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 + * Date: 2017-04-12 + * Time: 22:22:45 * */ @@ -12,6 +12,8 @@ transmit tools/basis.anubis transmit hayamiki_lib/view/types/hk_form_table_cell.anubis + + public type HK_Form_Table_Line: hk_form_table_line( List(HK_Form_Table_Cell) form_table_cells diff --git a/view/types/hk_list_view.anubis b/view/types/hk_list_view.anubis deleted file mode 100644 index 324dc4f..0000000 --- a/view/types/hk_list_view.anubis +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Created by 伝作 (Densaku). - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-10 - * Time: 09:51:00 - * - */ - -transmit system/muscle.anubis -transmit system/convert.anubis -transmit tools/basis.anubis - -transmit calexium_lib/web/types/web_action_name.anubis - -public type HK_List_View: - list_view_all, - list_view( - String view_name, - List(String) columns, - WEB_Action_Name link_id_action - ) -. - - HK_List_View message format - =========================== - - -public define Message - to_Message - ( - HK_List_View _hk_list_view - )= - with _hk_list_view_message = message((Word32)0), // - forget(add_string(_hk_list_view_message, "__TYPE__", "HK_List_View")); - if _hk_list_view is - { - //Alternative list_view_all (NO TYPE) - list_view_all then - forget(add_string(_hk_list_view_message, "__TYPE_ALT__", "list_view_all")), - - //Alternative list_view - list_view(_view_name, __columns, _link_id_action) then - forget(add_string(_hk_list_view_message, "__TYPE_ALT__", "list_view")); - // [type = String] list_view.view_name - forget(add_string(_hk_list_view_message, "view_name", _view_name)); - // [type = List(String)] list_view.columns - map_forget((String _columns) |-> add_string(_hk_list_view_message, "columns", _columns), __columns); - // [type = WEB_Action_Name] list_view.link_id_action - forget(add_message(_hk_list_view_message, "link_id_action", to_Message(_link_id_action))), - - }; - _hk_list_view_message -. - -public define Maybe(HK_List_View) - from_Message - ( - Message _hk_list_view_message - )= - if find_string(_hk_list_view_message, "__TYPE__") is {failure then failure, success(__type__) then - if find_string(_hk_list_view_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then - if __type__ = "HK_List_View" then - //Alternative list_view_all (NO TYPE) - if __type_alt__ = "list_view_all" then - success(list_view_all) - else //Alternative list_view - if __type_alt__ = "list_view" then //Alternative list_view - // [type = String] list_view.view_name - if find_string(_hk_list_view_message, "view_name") is {failure then failure, success(_view_name_) then - // [type = List(String)] list_view.columns - with _columns_ = find_string_list(_hk_list_view_message, "columns"), - // [type = WEB_Action_Name] list_view.link_id_action - if find_message(_hk_list_view_message, "link_id_action") is {failure then failure, success(_link_id_action__msg) then - if (Maybe(WEB_Action_Name))from_Message(_link_id_action__msg) is {failure then failure, success(_link_id_action_) then - - success(list_view(_view_name_, _columns_, _link_id_action_)) - }}} - else - failure //No valid Alternative found ! - else - failure //Type not found in message ! - }} -. - diff --git a/view/types/hk_viewer.anubis b/view/types/hk_viewer.anubis new file mode 100644 index 0000000..4956224 --- /dev/null +++ b/view/types/hk_viewer.anubis @@ -0,0 +1,86 @@ +/* + * Created by 伝作 (Densaku). + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) + * Date: 2017-04-12 + * Time: 22:22:45 + * + */ + +transmit system/muscle.anubis +transmit system/convert.anubis +transmit tools/basis.anubis + +transmit calexium_lib/web/types/web_action_name.anubis + + + +public type HK_Viewer: + list_view_all, + list_view( + String view_name, + List(String) columns, + WEB_Action_Name link_id_action + ) +. + + HK_Viewer message format + ======================== + + +public define Message + to_Message + ( + HK_Viewer _hk_viewer + )= + with _hk_viewer_message = message((Word32)0), // + forget(add_string(_hk_viewer_message, "__TYPE__", "HK_Viewer")); + if _hk_viewer is + { + //Alternative list_view_all (NO TYPE) + list_view_all then + forget(add_string(_hk_viewer_message, "__TYPE_ALT__", "list_view_all")), + + //Alternative list_view + list_view(_view_name, __columns, _link_id_action) then + forget(add_string(_hk_viewer_message, "__TYPE_ALT__", "list_view")); + // [type = String] list_view.view_name + forget(add_string(_hk_viewer_message, "view_name", _view_name)); + // [type = List(String)] list_view.columns + map_forget((String _columns) |-> add_string(_hk_viewer_message, "columns", _columns), __columns); + // [type = WEB_Action_Name] list_view.link_id_action + forget(add_message(_hk_viewer_message, "link_id_action", to_Message(_link_id_action))), + + }; + _hk_viewer_message +. + +public define Maybe(HK_Viewer) + from_Message + ( + Message _hk_viewer_message + )= + if find_string(_hk_viewer_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_viewer_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Viewer" then + //Alternative list_view_all (NO TYPE) + if __type_alt__ = "list_view_all" then + success(list_view_all) + else //Alternative list_view + if __type_alt__ = "list_view" then //Alternative list_view + // [type = String] list_view.view_name + if find_string(_hk_viewer_message, "view_name") is {failure then failure, success(_view_name_) then + // [type = List(String)] list_view.columns + with _columns_ = find_string_list(_hk_viewer_message, "columns"), + // [type = WEB_Action_Name] list_view.link_id_action + if find_message(_hk_viewer_message, "link_id_action") is {failure then failure, success(_link_id_action__msg) then + if (Maybe(WEB_Action_Name))from_Message(_link_id_action__msg) is {failure then failure, success(_link_id_action_) then + + success(list_view(_view_name_, _columns_, _link_id_action_)) + }}} + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + -- libgit2 0.21.4