note description: "Convertor to do hexadecimal string to integer/natural conversion" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2017-03-23 20:46:07 +0000 (Thu, 23 Mar 2017) $" revision: "$Revision: 100037 $" frozen class interface HEXADECIMAL_STRING_TO_INTEGER_CONVERTER create make feature -- Status Reporting separators_valid (separators: STRING_8): BOOLEAN -- Are separators valid? overflowed: BOOLEAN -- Is integer parsed so far overflowed? underflowed: BOOLEAN -- Is integer parsed so far underflowed? parse_successful: BOOLEAN -- This only means we didn't enter an invalid state when parsing, -- it doesn't mean that we have got an valid integer. -- You need to check is_integral_integer or is_part_of_integer. feature -- Reset reset (type: INTEGER_32) -- Reset this convertor to start a new parse session -- and get ready for parsing integer of type. -- Always call this feature before every new parse session. -- See NUMERIC_INFORMATION for more information about type. feature -- Parse parse_string_with_type (s: READABLE_STRING_GENERAL; type: INTEGER_32) -- reset convertor to start a new parse session and -- parse s to see if it is a number of type. -- Make result available in overflowed, underflowed and parse_successful. -- See NUMERIC_INFORMATION for more information about type. -- (Case insensitive) Hexadecimal prefixes can be '0x' or '&#x'. parse_character (c: CHARACTER_8) -- Parse c in current parse session. -- Make result available in overflowed, underflowed and parse_successful. feature -- Status Report conversion_type_valid (type: INTEGER_32): BOOLEAN -- If conversion type valid? is_part_of_integer: BOOLEAN -- Is character sequence that has been parsed so far a valid start part of an integer? is_integral_integer: BOOLEAN -- Is character sequence that has been parsed so far a valid integral integer? parsed_integer_8: INTEGER_8 -- INTEGER_8 representation of parsed string. parsed_integer_16: INTEGER_16 -- INTEGER_16 representation of parsed string. parsed_integer_32: INTEGER_32 -- INTEGER representation of parsed string. -- Was declared in HEXADECIMAL_STRING_TO_INTEGER_CONVERTER as synonym of parsed_integer. parsed_integer: INTEGER_32 -- INTEGER representation of parsed string. -- Was declared in HEXADECIMAL_STRING_TO_INTEGER_CONVERTER as synonym of parsed_integer_32. parsed_integer_64: INTEGER_64 -- INTEGER_64 representation of parsed string. parsed_natural_8: NATURAL_8 -- NATURAL_8 representation of parsed string. parsed_natural_16: NATURAL_16 -- NATURAL_16 representation of parsed string. parsed_natural_32: NATURAL_32 -- NATURAL_32 representation of parsed string. -- Was declared in HEXADECIMAL_STRING_TO_INTEGER_CONVERTER as synonym of parsed_natural. parsed_natural: NATURAL_32 -- NATURAL_32 representation of parsed string. -- Was declared in HEXADECIMAL_STRING_TO_INTEGER_CONVERTER as synonym of parsed_natural_32. parsed_natural_64: NATURAL_64 -- NATURAL_64 representation of parsed string. note copyright: "Copyright (c) 1984-2017, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class HEXADECIMAL_STRING_TO_INTEGER_CONVERTER
Generated by ISE EiffelStudio