indexing description: "[ This is your custom Eiffel type that already existed before you decided to use the GigaSpaces platform and modified to marshal data to/from GigaSpaces platform. ]" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date$" revision: "$Revision$" class PERSON_1 inherit MARSHALING_FUNCTIONS create make, make_from_entry feature fields_count: INTEGER = 5 class_name: STRING = "Person_1" feature array_of_int_32: ARRAY[INTEGER_32] array_of_int_64: ARRAY[INTEGER_64] array_of_real_32: ARRAY[REAL_32] array_of_real_64: ARRAY[REAL_64] array_of_boolean: ARRAY[BOOLEAN] feature -- Creation make is -- do create array_of_int_32.make (1,3) create array_of_int_64.make (1,3) create array_of_real_32.make (1,3) create array_of_real_64.make (1,3) create array_of_boolean.make (1,3) end make_from_entry (source: EGS_EXTERNAL_ENTRY) is -- require source_not_void: source /= Void local fields: JAVA_OBJECT_ARRAY count: INTEGER do fields := source.get_fields_values if fields /= Void then count := fields.count set_array_of_boolean (unmarshal_array_of_boolean (fields.item (0))) set_array_of_int_32 (unmarshal_array_of_integer_32 (fields.item (1))) set_array_of_int_64 (unmarshal_array_of_integer_64 (fields.item (2))) set_array_of_real_32 (unmarshal_array_of_real_32 (fields.item (3))) set_array_of_real_64 (unmarshal_array_of_real_64 (fields.item (4))) end end feature set_array_of_int_32 (an_array_of_int_32: like array_of_int_32) is -- require an_array_of_int_32_not_void: an_array_of_int_32 /= Void do array_of_int_32 := an_array_of_int_32 end set_array_of_int_64 (an_array_of_int_64: like array_of_int_64) is -- require an_array_of_int_64_not_void: an_array_of_int_64 /= Void do array_of_int_64 := an_array_of_int_64 end set_array_of_real_32 (an_array_of_real_32: like array_of_real_32) is -- require an_array_of_real_32_not_void: an_array_of_real_32 /= Void do array_of_real_32 := an_array_of_real_32 end set_array_of_real_64 (an_array_of_real_64: like array_of_real_64) is -- require an_array_of_real_64_not_void: an_array_of_real_64 /= Void do array_of_real_64 := an_array_of_real_64 end set_array_of_boolean (an_array_of_boolean: like array_of_boolean) is -- require an_array_of_boolean_ot_void: an_array_of_boolean /= Void do array_of_boolean := an_array_of_boolean end feature -- Marshaling marshal (add_type_info: BOOLEAN): EGS_EXTERNAL_ENTRY is -- local names: ARRAY[STRING] types: ARRAY[STRING] values: ARRAY[JAVA_OBJECT] do if add_type_info then -- the first time around, we have to add the typeinfo -- to give the Gigaspaces infrastructure the necessary -- metadata about our Eiffel type create names.make (1, fields_Count); create types.make (1, fields_Count); names.put ("array_of_boolean", 1) names.put ("array_of_int_32", 2) names.put ("array_of_int_64", 3) names.put ("array_of_real_32", 4) names.put ("array_of_real_64", 5) types.put (array_of_boolean_type_name, 1) types.put (array_of_int_32_type_name, 2) types.put (array_of_int_64_type_name, 3) types.put (array_of_real_32_type_name, 4) types.put (array_of_real_64_type_name, 5) end create values.make (1, fields_Count); values.put (marshal_array_of_boolean (array_of_boolean), 1) values.put (marshal_array_of_integer_32 (array_of_int_32), 2) values.put (marshal_array_of_integer_64 (array_of_int_64), 3) values.put (marshal_array_of_real_32 (array_of_real_32), 4) values.put (marshal_array_of_real_64 (array_of_real_64), 5) if add_type_info then create Result.make_from_classname_values_names_types (class_name, values, names, types ); else create Result.make_from_classname_values (class_name, values); end end indexing copyright: "Copyright (c) 2008, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end