Automatic generation produced by ISE Eiffel
note description: "[ Common routines for XML extraction, saving and deserialization ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2012-11-18 12:51:53 -0900 (Sun, 18 Nov 2012) $" revision: "$Revision: 89944 $" class interface XML_GRAPH_ROUTINES create {EG_XML_STORABLE} make (a_relative_window: like relative_window) -- Initialization require non_void_relative_window: a_relative_window /= Void ensure relative_window_set: relative_window = a_relative_window default_create -- Create an XML_ROUTINE feature -- Access Check_instruction: INTEGER_32 = 7 -- Exception code for violated check -- (from EXCEP_CONST) Class_invariant: INTEGER_32 = 6 -- Exception code for violated class invariant -- (from EXCEP_CONST) Com_exception: INTEGER_32 = 28 -- Exception code for a COM error. -- (from EXCEP_CONST) Create_on_deferred: INTEGER_32 = 17 -- Create on deferred -- (from EXCEP_CONST) Developer_exception: INTEGER_32 = 24 -- Exception code for developer exception -- (from EXCEP_CONST) Dollar_applied_to_melted_feature: INTEGER_32 = 26 -- $ applied to melted feature -- (from EXCEP_CONST) Eiffel_runtime_fatal_error: INTEGER_32 = 25 -- Eiffel run-time fatal error -- (from EXCEP_CONST) Eiffel_runtime_panic: INTEGER_32 = 13 -- Eiffel run-time panic -- (from EXCEP_CONST) Exception_in_signal_handler: INTEGER_32 = 20 -- Exception in signal handler -- (from EXCEP_CONST) Exception_manager: EXCEPTION_MANAGER -- Exception manager -- (from EXCEPTION_MANAGER_FACTORY) ensure -- from EXCEPTION_MANAGER_FACTORY instance_free: class exception_manager_not_void: Result /= Void External_exception: INTEGER_32 = 18 -- Exception code for operating system error -- which does not set the errno variable -- (Unix-specific) -- (from EXCEP_CONST) Floating_point_exception: INTEGER_32 = 5 -- Exception code for floating point exception -- (from EXCEP_CONST) generating_type: TYPE [detachable XML_GRAPH_ROUTINES] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty Incorrect_inspect_value: INTEGER_32 = 9 -- Exception code for inspect value which is not one -- of the inspect constants, if there is no Else_part -- (from EXCEP_CONST) Io_exception: INTEGER_32 = 21 -- Exception code for I/O error -- (from EXCEP_CONST) Loop_invariant: INTEGER_32 = 11 -- Exception code for violated loop invariant -- (from EXCEP_CONST) Loop_variant: INTEGER_32 = 10 -- Exception code for non-decreased loop variant -- (from EXCEP_CONST) No_more_memory: INTEGER_32 = 2 -- Exception code for failed memory allocation -- (from EXCEP_CONST) Number_of_codes: INTEGER_32 = 31 -- How many codes are there to represent exceptions? -- (from EXCEP_CONST) Old_exception: INTEGER_32 = 30 -- Old exception code. -- (from EXCEP_CONST) Operating_system_exception: INTEGER_32 = 22 -- Exception code for operating system error -- which sets the errno variable -- (Unix-specific) -- (from EXCEP_CONST) Out_of_memory: INTEGER_32 = 15 -- Out of memory (cannot be ignored) -- (from EXCEP_CONST) Postcondition: INTEGER_32 = 4 -- Exception code for violated postcondition -- (from EXCEP_CONST) Precondition: INTEGER_32 = 3 -- Exception code for violated precondition -- (from EXCEP_CONST) Rescue_exception: INTEGER_32 = 14 -- Exception code for exception in rescue clause -- (from EXCEP_CONST) Resumption_failed: INTEGER_32 = 16 -- Resumption failed (retry did not succeed) -- (from EXCEP_CONST) Retrieve_exception: INTEGER_32 = 23 -- Exception code for retrieval error -- may be raised by retrieved in IO_MEDIUM. -- (from EXCEP_CONST) Routine_failure: INTEGER_32 = 8 -- Exception code for failed routine -- (from EXCEP_CONST) Runtime_check_exception: INTEGER_32 = 29 -- Exception code for runtime check being violated. -- (from EXCEP_CONST) Runtime_io_exception: INTEGER_32 = 27 -- Exception code for I/O error raised by runtime functions -- such as store/retrieve, file access... -- (from EXCEP_CONST) Serialization_exception: INTEGER_32 = 31 -- Serialization exception code. -- (from EXCEP_CONST) Signal_exception: INTEGER_32 = 12 -- Exception code for operating system signal -- (from EXCEP_CONST) valid_code (c: INTEGER_32): BOOLEAN -- Is c a valid code to represent some kind of exceptions? -- (from EXCEP_CONST) Void_assigned_to_expanded: INTEGER_32 = 19 -- Exception code for assignment of void value -- to expanded entity -- (from EXCEP_CONST) Void_call_target: INTEGER_32 = 1 -- Exception code for feature applied to void reference -- (from EXCEP_CONST) feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: XML_GRAPH_ROUTINES): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: XML_GRAPH_ROUTINES): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "≜" (other: XML_GRAPH_ROUTINES): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report assertion_violation: BOOLEAN -- Is last exception originally due to a violated -- assertion or non-decreasing variant? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class exceptions_class_names: detachable STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void developer_exception_name: detachable STRING_8 -- Name of last developer-raised exception -- (from EXCEPTIONS) require -- from EXCEPTIONS applicable: is_developer_exception ensure -- from EXCEPTIONS instance_free: class exception: INTEGER_32 -- Code of last exception that occurred -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class exception_trace: detachable STRING_8 -- String representation of the exception trace -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_developer_exception: BOOLEAN -- Is the last exception originally due to -- a developer exception? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_developer_exception_of_name (name: detachable STRING_8): BOOLEAN -- Is the last exception originally due to a developer -- exception of name name? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_signal: BOOLEAN -- Is last exception originally due to an external -- event (operating system signal)? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_system_exception: BOOLEAN -- Is last exception originally due to an -- external event (operating system error)? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class meaning (except: INTEGER_32): detachable STRING_8 -- A message in English describing what except is -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_class_name: detachable STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_exception: INTEGER_32 -- Original code of last exception that triggered -- current exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_recipient_name: detachable STRING_8 -- Name of the routine whose execution was -- interrupted by original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_tag_name: detachable STRING_8 -- Assertion tag for original form of last -- assertion violation. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class recipient_name: detachable STRING_8 -- Name of the routine whose execution was -- interrupted by last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) exceptions_tag_name: detachable STRING_8 -- Tag of last violated assertion clause -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class feature -- Status setting catch (code: INTEGER_32) -- Make sure that any exception of code code will be -- caught. This is the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class die (code: INTEGER_32) -- Terminate execution with exit status code, -- without triggering an exception. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS False instance_free: class ignore (code: INTEGER_32) -- Make sure that any exception of code code will be -- ignored. This is not the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class message_on_failure -- Print an exception history table -- in case of failure. -- This is the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class no_message_on_failure -- Do not print an exception history table -- in case of failure. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class raise (name: detachable READABLE_STRING_GENERAL) -- Raise a developer exception of name name. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class raise_retrieval_exception (name: detachable READABLE_STRING_GENERAL) -- Raise a retrieval exception of name name. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class feature -- Duplication copy (other: XML_GRAPH_ROUTINES) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: XML_GRAPH_ROUTINES) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: XML_GRAPH_ROUTINES -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: XML_GRAPH_ROUTINES) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: XML_GRAPH_ROUTINES -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: XML_GRAPH_ROUTINES -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: detachable XML_GRAPH_ROUTINES -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Deserialization deserialize_document (a_file_path: READABLE_STRING_GENERAL): detachable XML_DOCUMENT -- Retrieve xml document associated to file -- serialized in a_file_path. -- If deserialization fails, return Void. require valid_file_path: a_file_path /= Void and then not a_file_path.is_empty deserialize_document_with_path (a_file_path: PATH): detachable XML_DOCUMENT -- Retrieve xml document associated to file -- serialized in a_file_path. -- If deserialization fails, return Void. require valid_file_path: a_file_path /= Void and then not a_file_path.is_empty feature -- Filters new_document_builder: XML_CALLBACKS_DOCUMENT -- New tree construction filter -- Was declared in {XML_CALLBACKS_FILTER_FACTORY} as synonym of `new_tree_builder`. -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY tree_builder_not_void: Result /= Void new_namespace_resolver: XML_NAMESPACE_RESOLVER -- New namespace resolver -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY namespace_resolver_not_void: Result /= Void new_null: XML_CALLBACKS_NULL -- New null callback consumer -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY null_callback_not_void: Result /= Void new_tree_builder: XML_CALLBACKS_DOCUMENT -- New tree construction filter -- Was declared in {XML_CALLBACKS_FILTER_FACTORY} as synonym of `new_document_builder`. -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY tree_builder_not_void: Result /= Void feature -- Filters to implement new_content_concatenator: XML_CONTENT_CONCATENATOR -- New content concatenation filter. -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY content_concatenator_not_void: Result /= Void new_indent_pretty_print: XML_INDENT_PRETTY_PRINT_FILTER -- Indenting pretty print filter -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY indent_pretty_print_not_void: Result /= Void new_pretty_print: XML_PRETTY_PRINT_FILTER -- New pretty printer (to standard io) -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY pretty_print_not_void: Result /= Void new_xmlns_generator: XML_XMLNS_GENERATOR -- New xmlns: generator (opposite of namespace resolver) -- (from XML_CALLBACKS_FILTER_FACTORY) ensure -- from XML_CALLBACKS_FILTER_FACTORY xmlns_generator_not_void: Result /= Void feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Pipes callbacks_pipe (a: ARRAY [XML_CALLBACKS_FILTER]): XML_CALLBACKS -- Make a pipe, -- eg << new_tag_checker, new_pretty_print >> -- return first item of pipe. -- (from XML_CALLBACKS_FILTER_FACTORY) require -- from XML_CALLBACKS_FILTER_FACTORY a_not_void: a /= Void a_not_empty: a.count > 0 ensure -- from XML_CALLBACKS_FILTER_FACTORY pipe_not_void: Result /= Void standard_callbacks_pipe (a: ARRAY [XML_CALLBACKS_FILTER]): XML_CALLBACKS -- Add elements to standard validation pipe, which -- begins with: -- namespace resolver -> stop on error -- (from XML_CALLBACKS_FILTER_FACTORY) require -- from XML_CALLBACKS_FILTER_FACTORY a_not_void: a /= Void ensure -- from XML_CALLBACKS_FILTER_FACTORY pipe_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- Saving save_xml_document (a_file_name: READABLE_STRING_GENERAL; a_doc: XML_DOCUMENT) -- Save a_doc in ptf require file_not_void: a_file_name /= Void file_exists: not a_file_name.is_empty save_xml_document_with_path (a_file_name: PATH; a_doc: XML_DOCUMENT) -- Save a_doc in ptf require file_not_void: a_file_name /= Void file_exists: not a_file_name.is_empty invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note copyright: "Copyright (c) 1984-2012, 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 XML_GRAPH_ROUTINES -- Generated by Eiffel Studio --
For more details: eiffel.org