indexing description: "[ An EM_GOOF_LOADER_NODE_PROCESSOR to load EM_GOOF_BALL from xml file. ]" date: "$Date$" revision: "$Revision$" class EM_GOOF_LOADER_OBJECT_BALL_NODE_PROCESSOR inherit EM_GOOF_LOADER_OBJECT_SIMPLE_NODE_PROCESSOR undefine make end EM_GOOF_LOADER_OBJECT_COLLIDABLE_NODE_PROCESSOR undefine make end EM_GOOF_LOADER_OBJECT_PHYSICABLE_NODE_PROCESSOR undefine make end create make feature -- Initialization make is -- Make 'Current' do Precursor Current.register_allowed_subnode ("object", name) end feature -- Access Name: STRING is -- Name of element to process do Result := "ball" end Mandatory_attributes: ARRAY [STRING] is -- Table of mandatory attributes once Result := << "image" >> Result := << "x" >> Result := << "y" >> Result.compare_objects end feature -- Basic operations process is -- Process node. local ball: EM_GOOF_BALL do if not has_attribute ("image") then set_error (Mandatory_attribute_missing, << "image" >>) elseif not has_attribute ("x") then set_error (Mandatory_attribute_missing, << "x" >>) elseif not has_attribute ("y") then set_error (Mandatory_attribute_missing, << "y" >>) elseif not attribute("x").is_double then set_error (Non_numeric_argument, << "x" >>) elseif not attribute("y").is_double then set_error (Non_numeric_argument, << "y" >>) else create ball.premake load_image(ball) if parent.container /= void then parent.container.add_item(ball) else level.add_object(ball) end load_physicable(ball) if has_attribute ("name") then level.register_object(attribute("name"), ball) end load_collidable(ball) end end file: STRING -- String in which the filename is stored end