note description: "Simple message. GENERATED DO NOT MODIFY" author: "Origo Team " date: "$Date$" revision: "$Revision$" class A_EXAMPLE_SIMPLE_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_string: like field_string; a_field_integer: like field_integer; a_field_boolean: like field_boolean; a_field_double: like field_double) -- Create do make_aranea_message field_string := a_field_string field_integer := a_field_integer field_boolean := a_field_boolean field_double := a_field_double ensure field_string_set: field_string = a_field_string field_integer_set: field_integer = a_field_integer field_boolean_set: field_boolean = a_field_boolean field_double_set: field_double = a_field_double end feature -- Message handling handle (a_handler: A_EXAMPLE_SIMPLE_MESSAGE_HANDLER) -- do a_handler.handle_simple (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_simple_type end field_string: A_STRING_MESSAGE field_integer: A_INTEGER_MESSAGE field_boolean: A_BOOLEAN_MESSAGE field_double: A_DOUBLE_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_string_argument + "%":") Result.append (field_string.serialize) Result.append (",") Result.append ("%"" + field_integer_argument + "%":") Result.append (field_integer.serialize) Result.append (",") Result.append ("%"" + field_boolean_argument + "%":") Result.append (field_boolean.serialize) Result.append (",") Result.append ("%"" + field_double_argument + "%":") Result.append (field_double.serialize) end parse_tag (a_tag: STRING; a_tokenizer: A_JSON_TOKENIZER) do if a_tag.is_equal (field_string_argument) then create field_string.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_integer_argument) then create field_integer.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_boolean_argument) then create field_boolean.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_double_argument) then create field_double.make_from_tokenizer (a_tokenizer) end end field_string_argument: STRING = "field_string" field_integer_argument: STRING = "field_integer" field_boolean_argument: STRING = "field_boolean" field_double_argument: STRING = "field_double" end