note description: "special message. GENERATED DO NOT MODIFY" author: "Origo Team " date: "$Date$" revision: "$Revision$" class A_EXAMPLE_SPECIAL_MESSAGE inherit A_ARANEA_MESSAGE rename make as make_aranea_message end A_EXAMPLE_CONSTANTS undefine is_equal, out end create make, make_from_tokenizer create {A_MESSAGE_FACTORY} make_from_ems_message feature {NONE} -- Initialization make (a_field_double_one: like field_double_one; a_field_double_two: like field_double_two; a_field_unicode: like field_unicode) -- Create require a_field_double_one_valid: a_field_double_one.value >= 0 a_field_unicode_not_empty: a_field_unicode /= Void and then not a_field_unicode.is_empty do make_aranea_message field_double_one := a_field_double_one field_double_two := a_field_double_two field_unicode := a_field_unicode ensure field_double_one_set: field_double_one = a_field_double_one field_double_two_set: field_double_two = a_field_double_two field_unicode_set: field_unicode = a_field_unicode end feature -- Message handling handle (a_handler: A_EXAMPLE_SPECIAL_MESSAGE_HANDLER) -- do a_handler.handle_special (Current) end feature -- Access namespace: STRING -- Namespace of the message type. once Result := example_namespace end type: STRING -- Type of the message. once Result := example_special_type end field_double_one: A_DOUBLE_MESSAGE field_double_two: A_DOUBLE_MESSAGE field_unicode: A_STRING_MESSAGE feature {NONE} -- Implementation serialization_list: attached STRING -- Lists the fields to serialize, and under which name do create Result.make_empty Result.append ("%"" + field_double_one_argument + "%":") Result.append (field_double_one.serialize) Result.append (",") Result.append ("%"" + field_double_two_argument + "%":") Result.append (field_double_two.serialize) Result.append (",") Result.append ("%"" + field_unicode_argument + "%":") Result.append (field_unicode.serialize) end parse_tag (a_tag: STRING; a_tokenizer: A_JSON_TOKENIZER) do if a_tag.is_equal (field_double_one_argument) then create field_double_one.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_double_two_argument) then create field_double_two.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_unicode_argument) then create field_unicode.make_from_tokenizer (a_tokenizer) end end field_double_one_argument: STRING = "field_double_one" field_double_two_argument: STRING = "field_double_two" field_unicode_argument: STRING = "field_unicode" invariant field_double_one_valid: field_double_one.value >= 0 field_unicode_not_empty: field_unicode /= Void and then not field_unicode.is_empty end