note description: "complex message. GENERATED DO NOT MODIFY" author: "Origo Team " date: "$Date$" revision: "$Revision$" class A_EXAMPLE_COMPLEX_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_integer: like field_integer; a_field_boolean: like field_boolean; a_field_string: like field_string; a_field_double: like field_double; a_field_binary: like field_binary; a_field_array_integer: like field_array_integer; a_field_array_boolean: like field_array_boolean; a_field_map_double: like field_map_double; a_field_map_string: like field_map_string; a_field_array_array: like field_array_array; a_field_map_map: like field_map_map; a_field_array_map: like field_array_map; a_field_map_array: like field_map_array; a_field_nested: like field_nested) -- Create require a_field_integer_valid: a_field_integer.value > 0 a_field_binary_not_void: a_field_binary /= Void a_field_array_integer_not_empty: a_field_array_integer /= Void and then not a_field_array_integer.is_empty a_field_array_boolean_not_empty: a_field_array_boolean /= Void and then not a_field_array_boolean.is_empty a_field_map_double_not_empty: a_field_map_double /= Void and then not a_field_map_double.is_empty a_field_map_string_not_empty: a_field_map_string /= Void and then not a_field_map_string.is_empty a_field_array_array_not_empty: a_field_array_array /= Void and then not a_field_array_array.is_empty a_field_map_map_not_empty: a_field_map_map /= Void and then not a_field_map_map.is_empty a_field_array_map_not_empty: a_field_array_map /= Void and then not a_field_array_map.is_empty a_field_map_array_not_empty: a_field_map_array /= Void and then not a_field_map_array.is_empty a_field_nested_not_empty: a_field_nested /= Void and then not a_field_nested.is_empty do make_aranea_message field_integer := a_field_integer field_boolean := a_field_boolean field_string := a_field_string field_double := a_field_double field_binary := a_field_binary field_array_integer := a_field_array_integer field_array_boolean := a_field_array_boolean field_map_double := a_field_map_double field_map_string := a_field_map_string field_array_array := a_field_array_array field_map_map := a_field_map_map field_array_map := a_field_array_map field_map_array := a_field_map_array field_nested := a_field_nested ensure field_integer_set: field_integer = a_field_integer field_boolean_set: field_boolean = a_field_boolean field_string_set: field_string = a_field_string field_double_set: field_double = a_field_double field_binary_set: field_binary = a_field_binary field_array_integer_set: field_array_integer = a_field_array_integer field_array_boolean_set: field_array_boolean = a_field_array_boolean field_map_double_set: field_map_double = a_field_map_double field_map_string_set: field_map_string = a_field_map_string field_array_array_set: field_array_array = a_field_array_array field_map_map_set: field_map_map = a_field_map_map field_array_map_set: field_array_map = a_field_array_map field_map_array_set: field_map_array = a_field_map_array field_nested_set: field_nested = a_field_nested end feature -- Message handling handle (a_handler: A_EXAMPLE_COMPLEX_MESSAGE_HANDLER) -- do a_handler.handle_complex (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_complex_type end field_integer: A_INTEGER_MESSAGE -- an integer field field_boolean: A_BOOLEAN_MESSAGE field_string: A_STRING_MESSAGE -- /* no comment */ field_double: A_DOUBLE_MESSAGE field_binary: A_BINARY_MESSAGE field_array_integer: A_SEQUENCE_MESSAGE[A_INTEGER_MESSAGE] field_array_boolean: A_SEQUENCE_MESSAGE[A_BOOLEAN_MESSAGE] field_map_double: A_MAP_MESSAGE[A_DOUBLE_MESSAGE] field_map_string: A_MAP_MESSAGE[A_STRING_MESSAGE] field_array_array: A_SEQUENCE_MESSAGE[A_SEQUENCE_MESSAGE[A_INTEGER_MESSAGE]] field_map_map: A_MAP_MESSAGE[A_MAP_MESSAGE[A_DOUBLE_MESSAGE]] field_array_map: A_SEQUENCE_MESSAGE[A_MAP_MESSAGE[A_STRING_MESSAGE]] field_map_array: A_MAP_MESSAGE[A_SEQUENCE_MESSAGE[A_BOOLEAN_MESSAGE]] field_nested: A_MAP_MESSAGE[A_EXAMPLE_NESTED_MESSAGE_MESSAGE] -- Statistics per project. feature {NONE} -- Implementation serialization_list: attached STRING -- Lists the fields to serialize, and under which name do create Result.make_empty 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_string_argument + "%":") Result.append (field_string.serialize) Result.append (",") Result.append ("%"" + field_double_argument + "%":") Result.append (field_double.serialize) Result.append (",") Result.append ("%"" + field_binary_argument + "%":") Result.append (field_binary.serialize) Result.append (",") Result.append ("%"" + field_array_integer_argument + "%":") Result.append (field_array_integer.serialize) Result.append (",") Result.append ("%"" + field_array_boolean_argument + "%":") Result.append (field_array_boolean.serialize) Result.append (",") Result.append ("%"" + field_map_double_argument + "%":") Result.append (field_map_double.serialize) Result.append (",") Result.append ("%"" + field_map_string_argument + "%":") Result.append (field_map_string.serialize) Result.append (",") Result.append ("%"" + field_array_array_argument + "%":") Result.append (field_array_array.serialize) Result.append (",") Result.append ("%"" + field_map_map_argument + "%":") Result.append (field_map_map.serialize) Result.append (",") Result.append ("%"" + field_array_map_argument + "%":") Result.append (field_array_map.serialize) Result.append (",") Result.append ("%"" + field_map_array_argument + "%":") Result.append (field_map_array.serialize) Result.append (",") Result.append ("%"" + field_nested_argument + "%":") Result.append (field_nested.serialize) end parse_tag (a_tag: STRING; a_tokenizer: A_JSON_TOKENIZER) do if 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_string_argument) then create field_string.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_double_argument) then create field_double.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_binary_argument) then create field_binary.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_array_integer_argument) then create field_array_integer.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_array_boolean_argument) then create field_array_boolean.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_map_double_argument) then create field_map_double.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_map_string_argument) then create field_map_string.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_array_array_argument) then create field_array_array.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_map_map_argument) then create field_map_map.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_array_map_argument) then create field_array_map.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_map_array_argument) then create field_map_array.make_from_tokenizer (a_tokenizer) elseif a_tag.is_equal (field_nested_argument) then create field_nested.make_from_tokenizer (a_tokenizer) end end field_integer_argument: STRING = "field_integer" field_boolean_argument: STRING = "field_boolean" field_string_argument: STRING = "field_string" field_double_argument: STRING = "field_double" field_binary_argument: STRING = "field_binary" field_array_integer_argument: STRING = "field_array_integer" field_array_boolean_argument: STRING = "field_array_boolean" field_map_double_argument: STRING = "field_map_double" field_map_string_argument: STRING = "field_map_string" field_array_array_argument: STRING = "field_array_array" field_map_map_argument: STRING = "field_map_map" field_array_map_argument: STRING = "field_array_map" field_map_array_argument: STRING = "field_map_array" field_nested_argument: STRING = "field_nested" invariant field_integer_valid: field_integer.value > 0 field_binary_not_void: field_binary /= Void field_array_integer_not_empty: field_array_integer /= Void and then not field_array_integer.is_empty field_array_boolean_not_empty: field_array_boolean /= Void and then not field_array_boolean.is_empty field_map_double_not_empty: field_map_double /= Void and then not field_map_double.is_empty field_map_string_not_empty: field_map_string /= Void and then not field_map_string.is_empty field_array_array_not_empty: field_array_array /= Void and then not field_array_array.is_empty field_map_map_not_empty: field_map_map /= Void and then not field_map_map.is_empty field_array_map_not_empty: field_array_map /= Void and then not field_array_map.is_empty field_map_array_not_empty: field_map_array /= Void and then not field_map_array.is_empty field_nested_not_empty: field_nested /= Void and then not field_nested.is_empty end