/tutorial/plugin/external_type/unsigned_int_wrapper.e
Specman e | 47 lines | 37 code | 7 blank | 3 comment | 0 complexity | c28bc144e8d65d6f992624bf71a962d0 MD5 | raw file
1expanded class UNSIGNED_INT_WRAPPER 2 3external "plug_in" 4alias "{ 5 location: "." 6 module_name: "plugin" 7 type_name: "unsigned_int" 8 default_value: "unsigned_int_default" 9 }" 10 11creation {ANY} 12 default_create, from_integer_64 13 14feature {ANY} 15 as_integer_64: INTEGER_64 is 16 do 17 Result := to_integer_64(Current) 18 end 19 20feature {} 21 from_integer_64 (value: INTEGER_64) is 22 do 23 set_from_integer_64(Current, value) 24 end 25 26 to_integer_64 (c: like Current): INTEGER_64 is 27 external "plug_in" 28 alias "{ 29 location: "." 30 module_name: "plugin" 31 feature_name: "unsigned_int_cast" 32 }" 33 end 34 35 set_from_integer_64 (c: like Current; value: INTEGER_64) is 36 -- This uses a macro to walk around expanded types' 37 -- paas-by-value convention. It only works if c actually 38 -- /is/ Current. 39 external "plug_in" 40 alias "{ 41 location: "." 42 module_name: "plugin" 43 feature_name: "unsigned_int_set" 44 }" 45 end 46 47end