note description: "[ Factory to create message objects. GENERATED DO NOT MODIFY! ]" author: "Origo Team " date: "$ Date: $" revision: "$ Revision: $" class A_MESSAGE_FACTORY inherit A_MESSAGE_FACTORY redefine register_builtin_handlers end A_EXAMPLE_CONSTANTS create make feature -- Creator handlers new_example_simple (a_msg: MESSAGE): A_EXAMPLE_SIMPLE_MESSAGE -- Create new typed message out of a_msg. require a_msg_not_void: a_msg /= Void do create Result.make_from_ems_message (a_msg) ensure Error_or_not_void: not is_error implies Result /= Void end new_example_simple_extended (a_msg: MESSAGE): A_EXAMPLE_SIMPLE_EXTENDED_MESSAGE -- Create new typed message out of a_msg. require a_msg_not_void: a_msg /= Void do create Result.make_from_ems_message (a_msg) ensure Error_or_not_void: not is_error implies Result /= Void end new_example_special (a_msg: MESSAGE): A_EXAMPLE_SPECIAL_MESSAGE -- Create new typed message out of a_msg. require a_msg_not_void: a_msg /= Void do create Result.make_from_ems_message (a_msg) ensure Error_or_not_void: not is_error implies Result /= Void end new_example_complex (a_msg: MESSAGE): A_EXAMPLE_COMPLEX_MESSAGE -- Create new typed message out of a_msg. require a_msg_not_void: a_msg /= Void do create Result.make_from_ems_message (a_msg) ensure Error_or_not_void: not is_error implies Result /= Void end feature {NONE} -- Implementation register_builtin_handlers -- Register the builtin handlers. do Precursor register_handler (example_namespace, example_simple_type, agent new_example_simple) register_handler (example_namespace, example_simple_extended_type, agent new_example_simple_extended) register_handler (example_namespace, example_special_type, agent new_example_special) register_handler (example_namespace, example_complex_type, agent new_example_complex) end end