note description: "Message that contains a single string" author: "Rafael Bischof " date: "$Date$" revision: "$Revision$" class A_GENERAL_STRING_MESSAGE inherit A_GENERAL_MESSAGE rename make as make_message redefine handle end create make, make_from_string create {A_MESSAGE_FACTORY} make_from_ems_message feature {NONE} -- Initialization make (a_string: like string) -- Create. require a_string_not_void: a_string /= Void do make_message string := a_string ensure string_set: string = a_string end make_from_string (a_string: STRING) -- Create this message using `a_string' of type STRING require string_specified: a_string /= Void do create string.make (a_string) ensure string_created: string /= Void correctly_set: string.value = a_string end feature -- Message handling handle (a_handler: A_GENERAL_STRING_MESSAGE_HANDLER) -- do a_handler.handle_general_string (Current) end feature -- Access type: STRING -- Type of the message. once Result := general_string_type end string: A_STRING_VALUE -- string of this message feature {NONE} -- Implementation string_argument: STRING = "string" serialization_list: attached STRING -- Lists the fields to serialize, and under which name do create Result.make_empty Result.append ("%"" + string_argument + "%":") Result.append (string.serialize) end parse_tag (a_tag: STRING; a_tokenizer: A_JSON_TOKENIZER) do if a_tag.is_equal (string_argument) then create string.make_from_tokenizer (a_tokenizer) end end invariant string_not_void: string /= Void end